1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

allow downgrade to HTTP 1.0

use HTTP/1.0 for update since the update handler not support any transfer Encoding
This commit is contained in:
Markus Sattler
2015-12-31 14:02:00 +01:00
parent b828f34348
commit ef748e369a
3 changed files with 30 additions and 2 deletions

View File

@ -146,6 +146,9 @@ t_httpUpdate_return ESP8266HTTPUpdate::handleUpdate(HTTPClient * http, const cha
t_httpUpdate_return ret = HTTP_UPDATE_FAILED;
// use HTTP/1.0 for update since the update handler not support any transfer Encoding
http->useHTTP10(true);
http->setTimeout(8000);
http->setUserAgent("ESP8266-http-Update");
http->addHeader("x-ESP8266-STA-MAC", WiFi.macAddress());
http->addHeader("x-ESP8266-AP-MAC", WiFi.softAPmacAddress());