Quick fix of value size in key:value in HTTP header.
Dependents: CC3000_demo idd_cc3000_chat CC3000_Nodejs TurretController ... more
Fork of HTTPClient by
Revision 19:25e3d3516a03, committed 2014-10-20
- Comitter:
- nebgnahz
- Date:
- Mon Oct 20 06:55:34 2014 +0000
- Parent:
- 18:277279a1891e
- Commit message:
- Fixed the bug in HTTPClient that restricted the value of header to be smaller than 32.
Changed in this revision
HTTPClient.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 277279a1891e -r 25e3d3516a03 HTTPClient.cpp --- a/HTTPClient.cpp Wed May 07 16:48:10 2014 +0000 +++ b/HTTPClient.cpp Mon Oct 20 06:55:34 2014 +0000 @@ -365,13 +365,13 @@ buf[crlfPos] = '\0'; char key[32]; - char value[32]; + char value[128]; //key[31] = '\0'; //value[31] = '\0'; memset(key, 0, 32); - memset(value, 0, 32); + memset(value, 0, 128); //int n = sscanf(buf, "%31[^:]: %31[^\r\n]", key, value); @@ -388,7 +388,7 @@ char* valueStart = keyEnd + 2; if( (valueStart - buf) < crlfPos ) { - if(strlen(valueStart) < 32) + if(strlen(valueStart) < 128) { strcpy(value, valueStart); n++;