From c4b73310d4bcbca67457bb9b0d748203b24aa1de Mon Sep 17 00:00:00 2001 From: Alessandro Menti Date: Thu, 4 Aug 2016 20:36:38 +0200 Subject: [PATCH] Have the SimGear HTTP client follow redirects --- simgear/io/HTTPClient.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simgear/io/HTTPClient.cxx b/simgear/io/HTTPClient.cxx index bc0a84fe..4d0bfde9 100644 --- a/simgear/io/HTTPClient.cxx +++ b/simgear/io/HTTPClient.cxx @@ -244,6 +244,8 @@ void Client::makeRequest(const Request_ptr& r) curl_easy_setopt(curlRequest, CURLOPT_USERAGENT, d->userAgent.c_str()); curl_easy_setopt(curlRequest, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); + curl_easy_setopt(curlRequest, CURLOPT_FOLLOWLOCATION, 1); + if (!d->proxy.empty()) { curl_easy_setopt(curlRequest, CURLOPT_PROXY, d->proxy.c_str()); curl_easy_setopt(curlRequest, CURLOPT_PROXYPORT, d->proxyPort); -- 2.39.5