From ce70cfdef16573317997c28d13f709797eb6c27d Mon Sep 17 00:00:00 2001 From: Jean Marc BRUNO Date: Mon, 11 Mar 2019 00:00:30 +0100 Subject: [PATCH] File with more than 32,767 characters --- .../Update/examples/AWS_S3_OTA_Update/AWS_S3_OTA_Update.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/Update/examples/AWS_S3_OTA_Update/AWS_S3_OTA_Update.ino b/libraries/Update/examples/AWS_S3_OTA_Update/AWS_S3_OTA_Update.ino index 6da329676a9..8582874f129 100644 --- a/libraries/Update/examples/AWS_S3_OTA_Update/AWS_S3_OTA_Update.ino +++ b/libraries/Update/examples/AWS_S3_OTA_Update/AWS_S3_OTA_Update.ino @@ -26,7 +26,7 @@ WiFiClient client; // Variables to validate // response from S3 -int contentLength = 0; +long contentLength = 0; bool isValidContentType = false; // Your SSID and PSWD that the chip needs @@ -120,7 +120,7 @@ void execOTA() { // extract headers here // Start with content length if (line.startsWith("Content-Length: ")) { - contentLength = atoi((getHeaderValue(line, "Content-Length: ")).c_str()); + contentLength = atol((getHeaderValue(line, "Content-Length: ")).c_str()); Serial.println("Got " + String(contentLength) + " bytes from server"); }