Set max redirects in libcurl backend to 20

If a webserver is doing more redirects than that I think it's just stuffed
This commit is contained in:
UnknownShadow200 2019-08-07 07:31:36 +10:00
parent 137813cec8
commit fd3fac3b0e

View File

@ -671,6 +671,7 @@ static size_t Http_ProcessData(char *buffer, size_t size, size_t nitems, void* u
static void Http_SetCurlOpts(struct HttpRequest* req) {
curl_easy_setopt(curl, CURLOPT_USERAGENT, GAME_APP_NAME);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 20L);
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, Http_ProcessHeader);
curl_easy_setopt(curl, CURLOPT_HEADERDATA, req);