mirror of https://github.com/axmolengine/axmol.git
Merge pull request #1352 from sburavtsov/HttpClientFix-FOLLOW_LOCATION
To be able to handle 302 redirects with curl we need to set option CURLOPT_FOLLOWLOCATION
This commit is contained in:
commit
befaf686bb
|
@ -252,6 +252,12 @@ int processGetTask(CCHttpRequest *request, write_callback callback, void *stream
|
|||
break;
|
||||
}
|
||||
|
||||
code = curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, request->getUrl());
|
||||
if (code != CURLE_OK)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
code = curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, callback);
|
||||
if (code != CURLE_OK)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue