From f2ba909c353400a62c27a4653484e54e3c7e4f35 Mon Sep 17 00:00:00 2001 From: djdron Date: Thu, 7 Dec 2017 00:30:59 +0200 Subject: [PATCH] + enable follow to support redirections with curl library --- platform/web/curl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/web/curl.cpp b/platform/web/curl.cpp index ebf1847f..ed59edfd 100644 --- a/platform/web/curl.cpp +++ b/platform/web/curl.cpp @@ -49,6 +49,7 @@ std::string GetURL(const char* path) curl_easy_setopt(curl, CURLOPT_URL, path); curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); std::string file_data; curl_easy_setopt(curl, CURLOPT_WRITEDATA, &file_data); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, _write_callback);