]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hyper: pass the CONNECT line to the debug callback
authorDaniel Stenberg <daniel@haxx.se>
Thu, 21 Oct 2021 14:03:11 +0000 (16:03 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 21 Oct 2021 14:51:17 +0000 (16:51 +0200)
Closes #7887

lib/http_proxy.c

index 82e282d293721ad816ba0e49d3127409e3d7ef71..d144990c596c7d86801a359c4fc9fef230cd1e4b 100644 (file)
@@ -816,6 +816,15 @@ static CURLcode CONNECT(struct Curl_easy *data,
         result = CURLE_OUT_OF_MEMORY;
         goto error;
       }
+      if(data->set.verbose) {
+        char *se = aprintf("CONNECT %s HTTP/1.1\r\n", hostheader);
+        if(!se) {
+          result = CURLE_OUT_OF_MEMORY;
+          goto error;
+        }
+        Curl_debug(data, CURLINFO_HEADER_OUT, se, strlen(se));
+        free(se);
+      }
       /* Setup the proxy-authorization header, if any */
       result = Curl_http_output_auth(data, conn, "CONNECT", HTTPREQ_GET,
                                      hostheader, TRUE);