Fixed custom headers and Basic authorization, added support for redirection, functional file download interface can be used for SW updates and more.
Dependents: Sample_HTTPClient Sample_HTTPClient LWM2M_NanoService_Ethernet LWM2M_NanoService_Ethernet ... more
Fork of HTTPClient by
More recent changes - added iCal processing.
Derivative of a derivative, however this one works when it comes to supplying Basic authorization to access a protected resource. Some additional changes to the debug interface to clean it up for consistency with many other components I have.
Diff: HTTPClient.cpp
- 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);