It is the new miniTLS program which build the connect with the website httpbin.org
Fork of MiniTLS-HTTPSClient by
Revision 1:4309aff9b1db, committed 2015-02-06
- Comitter:
- shiyilei
- Date:
- Fri Feb 06 06:18:13 2015 +0000
- Parent:
- 0:62a4a8ec4ab5
- Commit message:
- This is the new MiniTLS program which build the connection with the website httpbin.org
Changed in this revision
HTTPClient.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/HTTPClient.cpp Tue Jun 10 14:23:22 2014 +0000 +++ b/HTTPClient.cpp Fri Feb 06 06:18:13 2015 +0000 @@ -333,8 +333,9 @@ PRTCL_ERR(); } - if( (m_httpResponseCode < 200) || (m_httpResponseCode >= 300) ) - { + + if( (m_httpResponseCode < 200) || (m_httpResponseCode >= 300) ) + { //Did not return a 2xx code; TODO fetch headers/(&data?) anyway and implement a mean of writing/reading headers WARN("Response code %d", m_httpResponseCode); PRTCL_ERR(); @@ -399,13 +400,14 @@ if(keyEnd != NULL) { *keyEnd = '\0'; - if(strlen(buf) < 32) + if(strlen(buf) < 50) { strcpy(key, buf); n++; char* valueStart = keyEnd + 2; if( (valueStart - buf) < crlfPos ) { + printf("valuestart=%d\r\n",strlen(valueStart)); if(strlen(valueStart) < 32) { strcpy(value, valueStart); @@ -414,6 +416,7 @@ } } } + printf("n=%d\r\n",n); if ( n == 2 ) { DBG("Read header : %s: %s\n", key, value);