mirror of https://github.com/axmolengine/axmol.git
Fixed HttpClient-ios request to work when the data is started by 0x00.
This commit is contained in:
parent
1b482b2c3f
commit
c05dd4357d
|
@ -192,7 +192,7 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream
|
||||||
}
|
}
|
||||||
|
|
||||||
char* requestDataBuffer = request->getRequestData();
|
char* requestDataBuffer = request->getRequestData();
|
||||||
if (nullptr != requestDataBuffer && 0 != strlen(requestDataBuffer))
|
if (nullptr != requestDataBuffer && 0 != request->getRequestDataSize())
|
||||||
{
|
{
|
||||||
NSData *postData = [NSData dataWithBytes:requestDataBuffer length:request->getRequestDataSize()];
|
NSData *postData = [NSData dataWithBytes:requestDataBuffer length:request->getRequestDataSize()];
|
||||||
[nsrequest setHTTPBody:postData];
|
[nsrequest setHTTPBody:postData];
|
||||||
|
|
Loading…
Reference in New Issue