From c39fda4b3d6c6f4c4f8662e61a8bc90b45f64140 Mon Sep 17 00:00:00 2001 From: ibrahimSP Date: Mon, 26 Apr 2021 05:18:43 +0200 Subject: [PATCH 1/2] Update HttpClient.h fixed large file size for Arduino OTA issue --- src/HttpClient.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HttpClient.h b/src/HttpClient.h index 6a7aa1d..72ed122 100644 --- a/src/HttpClient.h +++ b/src/HttpClient.h @@ -272,7 +272,7 @@ class HttpClient : public Client @return Length of the body, in bytes, or kNoContentLengthHeader if no Content-Length header was returned by the server */ - int contentLength(); + long contentLength(); /** Returns if the response body is chunked @return true if response body is chunked, false otherwise @@ -372,7 +372,7 @@ class HttpClient : public Client // Stores the status code for the response, once known int iStatusCode; // Stores the value of the Content-Length header, if present - int iContentLength; + long iContentLength; // How many bytes of the response body have been read by the user int iBodyLengthConsumed; // How far through a Content-Length header prefix we are From 328f27bf0cf8d794dc08c729c60bbdd77ef8ab18 Mon Sep 17 00:00:00 2001 From: ibrahimSP Date: Mon, 26 Apr 2021 05:19:57 +0200 Subject: [PATCH 2/2] Update HttpClient.cpp --- src/HttpClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HttpClient.cpp b/src/HttpClient.cpp index 1c73464..3a825d6 100644 --- a/src/HttpClient.cpp +++ b/src/HttpClient.cpp @@ -542,7 +542,7 @@ bool HttpClient::endOfHeadersReached() return (iState == eReadingBody || iState == eReadingChunkLength || iState == eReadingBodyChunk); }; -int HttpClient::contentLength() +long HttpClient::contentLength() { // skip the response headers, if they haven't been read already if (!endOfHeadersReached())