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

Added Chip ID into HTTP header (#3877)

This commit is contained in:
c0degeek 2019-10-05 20:28:33 +02:00 committed by Earle F. Philhower, III
parent 5d20137339
commit d4897cd216

View File

@ -263,6 +263,7 @@ HTTPUpdateResult ESP8266HTTPUpdate::handleUpdate(HTTPClient& http, const String&
http.setTimeout(_httpClientTimeout); http.setTimeout(_httpClientTimeout);
http.setFollowRedirects(_followRedirects); http.setFollowRedirects(_followRedirects);
http.setUserAgent(F("ESP8266-http-Update")); http.setUserAgent(F("ESP8266-http-Update"));
http.addHeader(F("x-ESP8266-Chip-ID"), String(ESP.getChipId()));
http.addHeader(F("x-ESP8266-STA-MAC"), WiFi.macAddress()); http.addHeader(F("x-ESP8266-STA-MAC"), WiFi.macAddress());
http.addHeader(F("x-ESP8266-AP-MAC"), WiFi.softAPmacAddress()); http.addHeader(F("x-ESP8266-AP-MAC"), WiFi.softAPmacAddress());
http.addHeader(F("x-ESP8266-free-space"), String(ESP.getFreeSketchSpace())); http.addHeader(F("x-ESP8266-free-space"), String(ESP.getFreeSketchSpace()));