From c05dd4357d7612e3d7f017d10ec1c5d2fbc1ab95 Mon Sep 17 00:00:00 2001 From: Jongryul Kook Date: Wed, 18 Feb 2015 16:45:43 +0900 Subject: [PATCH] Fixed HttpClient-ios request to work when the data is started by 0x00. --- cocos/network/HttpClient-ios.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/network/HttpClient-ios.mm b/cocos/network/HttpClient-ios.mm index 9a63e5e265..708fa72cc3 100644 --- a/cocos/network/HttpClient-ios.mm +++ b/cocos/network/HttpClient-ios.mm @@ -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];