From 61ebee12ad692da424ac86a561749f9402e406af Mon Sep 17 00:00:00 2001 From: James Turner Date: Tue, 22 Jan 2019 10:18:25 +0100 Subject: [PATCH] Set curl VERBOSE based on current SG log settings --- simgear/io/HTTPClient.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/simgear/io/HTTPClient.cxx b/simgear/io/HTTPClient.cxx index fe6fa737..0c31354b 100644 --- a/simgear/io/HTTPClient.cxx +++ b/simgear/io/HTTPClient.cxx @@ -273,6 +273,10 @@ 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); + if (sglog().would_log(SG_TERRASYNC, SG_DEBUG)) { + curl_easy_setopt(curlRequest, CURLOPT_VERBOSE, 1); + } + curl_easy_setopt(curlRequest, CURLOPT_FOLLOWLOCATION, 1); if (!d->proxy.empty()) {