]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
doh: inherit DEBUGFUNCTION/DATA
authorDaniel Stenberg <daniel@haxx.se>
Sat, 16 Sep 2023 09:17:45 +0000 (11:17 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 16 Sep 2023 16:27:38 +0000 (18:27 +0200)
When creating new transfers for doing DoH, they now inherit the debug
settings from the initiating transfer, so that the application can
redirect and handle the verbose output correctly even for the DoH
transfers.

Reported-by: calvin2021y on github
Fixes #11864
Closes #11869

lib/doh.c

index 7a38eab01f44e4d206f4dc1a40cdbe18e9f9121c..6f99a061c33b486eba75594cc068abe231454b6c 100644 (file)
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -307,6 +307,10 @@ static CURLcode dohprobe(struct Curl_easy *data,
       ERROR_CHECK_SETOPT(CURLOPT_SSL_CTX_FUNCTION, data->set.ssl.fsslctx);
     if(data->set.ssl.fsslctxp)
       ERROR_CHECK_SETOPT(CURLOPT_SSL_CTX_DATA, data->set.ssl.fsslctxp);
+    if(data->set.fdebug)
+      ERROR_CHECK_SETOPT(CURLOPT_DEBUGFUNCTION, data->set.fdebug);
+    if(data->set.debugdata)
+      ERROR_CHECK_SETOPT(CURLOPT_DEBUGDATA, data->set.debugdata);
     if(data->set.str[STRING_SSL_EC_CURVES]) {
       ERROR_CHECK_SETOPT(CURLOPT_SSL_EC_CURVES,
                          data->set.str[STRING_SSL_EC_CURVES]);