summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2021-02-25 15:49:00 -0500
committerJay Satiro <raysatiro@yahoo.com>2021-03-02 16:59:28 -0500
commit1ba0d4bdb39e8fff541484afaee8a1f308a12018 (patch)
treebeee0738c4a8e366b88b66d35384a0d261d0ed83
parentcc9bf974cd8dc53fbb24d6f7a6dc558c71bff5bd (diff)
downloadcurl-1ba0d4bdb39e8fff541484afaee8a1f308a12018.tar.gz
doh: Inherit CURLOPT_STDERR from user's easy handle
Prior to this change if the user set their easy handle's error stream to something other than stderr it was not inherited by the doh handles, which meant that they would still write to the default standard error stream (stderr) for verbose output. Bug: https://github.com/curl/curl/issues/6605 Reported-by: arvids-kokins-bidstack@users.noreply.github.com Closes https://github.com/curl/curl/pull/6661
-rw-r--r--lib/doh.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/doh.c b/lib/doh.c
index dcc1f6da6..15cdc35a4 100644
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -285,6 +285,8 @@ static CURLcode dohprobe(struct Curl_easy *data,
#endif
ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
ERROR_CHECK_SETOPT(CURLOPT_SHARE, data->share);
+ if(data->set.err && data->set.err != stderr)
+ ERROR_CHECK_SETOPT(CURLOPT_STDERR, data->set.err);
if(data->set.verbose)
ERROR_CHECK_SETOPT(CURLOPT_VERBOSE, 1L);
if(data->set.no_signal)