mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
see #395
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:
parent
3b6512ea1d
commit
a27029cbc5
@ -47,14 +47,10 @@ File uploadFile;
|
|||||||
|
|
||||||
|
|
||||||
void returnOK() {
|
void returnOK() {
|
||||||
server.sendHeader("Connection", "close");
|
|
||||||
server.sendHeader("Access-Control-Allow-Origin", "*");
|
|
||||||
server.send(200, "text/plain", "");
|
server.send(200, "text/plain", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
void returnFail(String msg) {
|
void returnFail(String msg) {
|
||||||
server.sendHeader("Connection", "close");
|
|
||||||
server.sendHeader("Access-Control-Allow-Origin", "*");
|
|
||||||
server.send(500, "text/plain", msg + "\r\n");
|
server.send(500, "text/plain", msg + "\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user