From e0beac88c93457c8a96b85242340a0670bac61fc Mon Sep 17 00:00:00 2001 From: Jean Marc BRUNO Date: Thu, 11 Apr 2019 16:54:40 +0200 Subject: [PATCH] File with more than 32,767 characters (#2566) --- .../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 6da32967..8582874f 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"); }