Fork HTTPClient and Modfiy code for mbed 6.0

Dependents:   mbed-demo-http-get-json

Revision:
22:d6b08d9749d6
Parent:
21:d33f7e1ce811
Child:
24:eee214e3e806
--- a/HTTPClient.cpp	Sun Feb 09 22:25:28 2014 +0000
+++ b/HTTPClient.cpp	Sun Mar 09 16:39:40 2014 +0000
@@ -313,7 +313,7 @@
         crlfPtr = strstr(buf, "\r\n");
         if(crlfPtr == NULL) {
             if( trfLen < CHUNK_SIZE - 1 ) {
-                size_t newTrfLen;
+                size_t newTrfLen = 0;
                 ret = recv(buf + trfLen, 1, CHUNK_SIZE - trfLen - 1, &newTrfLen);
                 trfLen += newTrfLen;
                 buf[trfLen] = '\0';
@@ -389,7 +389,7 @@
                 }
                 if(!foundCrlf) { //Try to read more
                     if( trfLen < CHUNK_SIZE ) {
-                        size_t newTrfLen;
+                        size_t newTrfLen = 0;
                         ret = recv(buf + trfLen, 0, CHUNK_SIZE - trfLen - 1, &newTrfLen);
                         trfLen += newTrfLen;
                         CHECK_CONN_ERR(ret);