diff --git a/examples/SimpleHttpExample/SimpleHttpExample.ino b/examples/SimpleHttpExample/SimpleHttpExample.ino index dd8cb10..d409b42 100644 --- a/examples/SimpleHttpExample/SimpleHttpExample.ino +++ b/examples/SimpleHttpExample/SimpleHttpExample.ino @@ -6,8 +6,8 @@ // outputs the content to the serial port #include -#include #include +#include // This example downloads the URL "http://arduino.cc/" @@ -82,6 +82,7 @@ void loop() char c; // Whilst we haven't timed out & haven't reached the end of the body while ( (http.connected() || http.available()) && + (bodyLen > 0 || bodyLen != HttpClient::kNoContentLengthHeader) && ((millis() - timeoutStart) < kNetworkTimeout) ) { if (http.available())