From dd245effd2469bb4058be4d65750a85be5fbb1c8 Mon Sep 17 00:00:00 2001 From: hogliux Date: Thu, 7 Jul 2016 14:37:58 +0100 Subject: [PATCH] Have curl follow re-directions automatically --- modules/juce_core/native/juce_curl_Network.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/juce_core/native/juce_curl_Network.cpp b/modules/juce_core/native/juce_curl_Network.cpp index e9f884869e..b06756f5b8 100644 --- a/modules/juce_core/native/juce_curl_Network.cpp +++ b/modules/juce_core/native/juce_curl_Network.cpp @@ -142,7 +142,8 @@ private: && curl_easy_setopt (curl, CURLOPT_WRITEDATA, this) == CURLE_OK && curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, StaticCurlWrite) == CURLE_OK && curl_easy_setopt (curl, CURLOPT_MAXREDIRS, static_cast (maxRedirects)) == CURLE_OK - && curl_easy_setopt (curl, CURLOPT_USERAGENT, userAgent.toRawUTF8()) == CURLE_OK) + && curl_easy_setopt (curl, CURLOPT_USERAGENT, userAgent.toRawUTF8()) == CURLE_OK + && curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1) == CURLE_OK) { if (isPost) {