1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00
server.send() already injects the "Connection" and "Access-Control-Allow-Origin" headers.
No point in doing that twice. (browsers could get confused)
This commit is contained in:
Markus Sattler 2015-11-27 09:47:06 +01:00
parent 3b6512ea1d
commit a27029cbc5

View File

@ -47,14 +47,10 @@ File uploadFile;
void returnOK() {
server.sendHeader("Connection", "close");
server.sendHeader("Access-Control-Allow-Origin", "*");
server.send(200, "text/plain", "");
}
void returnFail(String msg) {
server.sendHeader("Connection", "close");
server.sendHeader("Access-Control-Allow-Origin", "*");
server.send(500, "text/plain", msg + "\r\n");
}