@zhangxm I have done simple debugging and found that the request has a hard limit on the data for some reason.
I mean, if the response is too long, not all of it will be received. Here is my test:
network::HttpClient *client = network::HttpClient::getInstance();
network::HttpRequest *request = new network::HttpRequest();
request->setResponseCallback([=](network::HttpClient* client, network::HttpResponse* response)
auto v = response->getResponseData();
char *buffer = new char[v->size()];
std::copy(v->begin(), v->end(), buffer);
CCLOG("DONE! %s - %ld - %s", response->isSucceed() ? "YES" : "NO", response->getResponseCode(), buffer);
I get (Sorry, HTML not showing because of a bug in the forums):
cocos2d: DONE! YES - 200 -
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
what’s around you, … is ba
I took away the middle part of the response, but you see in the end, it doesn't doesn't download the whole thing.