A HTTP Client for the mbed networking libraries

Dependents:   HTTPClient_Wifly_HelloWorld HTTPPoster HTTPClient_HelloWorld mpod_nhk_english ... more

Fork of HTTPClientLib by Donatien Garnier

Files at this revision

API Documentation at this revision

Comitter:
donatien
Date:
Wed May 07 16:48:10 2014 +0000
Parent:
17:679e15a3d3db
Commit message:
Fixed issue with ARMCC

Changed in this revision

HTTPClient.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 679e15a3d3db -r 277279a1891e HTTPClient.cpp
--- a/HTTPClient.cpp	Fri May 02 13:13:39 2014 +0000
+++ b/HTTPClient.cpp	Wed May 07 16:48:10 2014 +0000
@@ -381,15 +381,16 @@
     if(keyEnd != NULL)
     {
       *keyEnd = '\0';
-    
-      if(sscanf(buf, "%31c", key) == 1)
+      if(strlen(buf) < 32)
       {
+        strcpy(key, buf);
         n++;
         char* valueStart = keyEnd + 2;
         if( (valueStart - buf) < crlfPos )
         {
-          if(sscanf(valueStart, "%31c", value) == 1)
-          {
+          if(strlen(valueStart) < 32)
+          { 
+            strcpy(value, valueStart);
             n++;
           }
         }