Fork of mbed-http

Fork of mbed-http by sandbox

Revision:
14:5f9acddaa0a4
Parent:
13:efe5c8b16dab
--- a/source/http_request.h	Wed Mar 29 16:52:54 2017 +0100
+++ b/source/http_request.h	Wed Mar 29 17:26:14 2017 +0100
@@ -167,7 +167,8 @@
                 return NULL;
             }
 
-            if (response->get_expected_content_length() == 0) {
+            // if we don't get a content-length field in the first chunk, assume it's chunked.
+            if (!response->get_have_content_length()) {
                 response->set_chunked();
             }