Fixed HttpClient-ios request to work when the data is started by 0x00.

This commit is contained in:
Jongryul Kook 2015-02-18 16:45:43 +09:00
parent 1b482b2c3f
commit c05dd4357d
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream
}
char* requestDataBuffer = request->getRequestData();
if (nullptr != requestDataBuffer && 0 != strlen(requestDataBuffer))
if (nullptr != requestDataBuffer && 0 != request->getRequestDataSize())
{
NSData *postData = [NSData dataWithBytes:requestDataBuffer length:request->getRequestDataSize()];
[nsrequest setHTTPBody:postData];