We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cf10b4 commit 087a3e9Copy full SHA for 087a3e9
src/ota/interface/OTAInterfaceDefault.cpp
@@ -55,12 +55,12 @@ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::startOTA() {
55
}
56
57
// The following call is required to save the header value , keep it
58
- context->contentLength = http_client->contentLength();
59
- if(context->contentLength == HttpClient::kNoContentLengthHeader) {
+ if(http_client->contentLength() == HttpClient::kNoContentLengthHeader) {
60
DEBUG_VERBOSE("OTA ERROR: the response header doesn't contain \"ContentLength\" field");
61
return HttpHeaderErrorFail;
62
63
+ context->contentLength = http_client->contentLength();
64
context->lastReportTime = millis();
65
DEBUG_VERBOSE("OTA file length: %d", context->contentLength);
66
return Fetch;
0 commit comments