mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-27 21:16:50 +03:00
Merge pull request #1501 from Links2004/master
fix #1499 - ESPhttpUpdate.updateSpiffs
This commit is contained in:
commit
85973cdc8c
@ -241,6 +241,7 @@ t_httpUpdate_return ESP8266HTTPUpdate::handleUpdate(HTTPClient * http, const cha
|
|||||||
DEBUG_HTTP_UPDATE("[httpUpdate] runUpdate flash...\n");
|
DEBUG_HTTP_UPDATE("[httpUpdate] runUpdate flash...\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!spiffs) {
|
||||||
uint8_t buf[4];
|
uint8_t buf[4];
|
||||||
if(tcp->peekBytes(&buf[0], 4) != 4) {
|
if(tcp->peekBytes(&buf[0], 4) != 4) {
|
||||||
DEBUG_HTTP_UPDATE("[httpUpdate] peekBytes magic header failed\n");
|
DEBUG_HTTP_UPDATE("[httpUpdate] peekBytes magic header failed\n");
|
||||||
@ -267,6 +268,7 @@ t_httpUpdate_return ESP8266HTTPUpdate::handleUpdate(HTTPClient * http, const cha
|
|||||||
http->end();
|
http->end();
|
||||||
return HTTP_UPDATE_FAILED;
|
return HTTP_UPDATE_FAILED;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(runUpdate(*tcp, len, http->header("x-MD5"), command)) {
|
if(runUpdate(*tcp, len, http->header("x-MD5"), command)) {
|
||||||
ret = HTTP_UPDATE_OK;
|
ret = HTTP_UPDATE_OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user