1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Merge pull request #1712 from jacquesbotha/patch-1

Update ESP8266HTTPUpdateServer.cpp
This commit is contained in:
Ivan Grokhotkov 2016-03-10 12:55:20 +03:00
commit 40f919e788

View File

@ -34,7 +34,7 @@ void ESP8266HTTPUpdateServer::setup(ESP8266WebServer *server)
_server->on("/update", HTTP_POST, [&](){ _server->on("/update", HTTP_POST, [&](){
_server->sendHeader("Connection", "close"); _server->sendHeader("Connection", "close");
_server->sendHeader("Access-Control-Allow-Origin", "*"); _server->sendHeader("Access-Control-Allow-Origin", "*");
_server->send(200, "text/plain", (Update.hasError())?"FAIL":"OK"); _server->send(200, "text/html", (Update.hasError())?"FAIL":"<META http-equiv=\"refresh\" content=\"15;URL=/update\">OK");
ESP.restart(); ESP.restart();
},[&](){ },[&](){
// handler for the file upload, get's the sketch bytes, and writes // handler for the file upload, get's the sketch bytes, and writes