RequestServer: Add a CURL_DEBUG flag

This sets `CURLOPT_VERBOSE` to 1, which enables detailed logging of
all cURL connections to stderr.
This commit is contained in:
Tim Ledbetter
2025-11-03 10:13:25 +00:00
committed by Tim Flynn
parent 61a0898f5f
commit fe377977d9
3 changed files with 8 additions and 0 deletions

View File

@@ -54,6 +54,10 @@
# cmakedefine01 CSS_TRANSITIONS_DEBUG
#endif
#ifndef CURL_DEBUG
# cmakedefine01 CURL_DEBUG
#endif
#ifndef DEVTOOLS_DEBUG
# cmakedefine01 DEVTOOLS_DEBUG
#endif

View File

@@ -9,6 +9,7 @@ set(CSS_LOADER_DEBUG ON)
set(CSS_PARSER_DEBUG ON)
set(CSS_TOKENIZER_DEBUG ON)
set(CSS_TRANSITIONS_DEBUG ON)
set(CURL_DEBUG ON)
set(DEVTOOLS_DEBUG ON)
set(DNS_DEBUG ON)
set(EDITOR_DEBUG ON)

View File

@@ -339,6 +339,9 @@ void Request::handle_fetch_state()
set_option(CURLOPT_CUSTOMREQUEST, m_method.characters());
set_option(CURLOPT_FOLLOWLOCATION, 0);
if constexpr (CURL_DEBUG) {
set_option(CURLOPT_VERBOSE, 1);
}
#if defined(AK_OS_WINDOWS)
// Without explicitly using the OS Native CA cert store on Windows, https requests timeout with CURLE_PEER_FAILED_VERIFICATION