From 28359fb23dfb023d4b7e82bc16a48241017d2a02 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Mon, 19 Sep 2022 15:06:27 +0200 Subject: [PATCH] Also print the `CURLcode` on failed requests This should help debugging the empty error messages we sometimes get on servers. --- src/engine/shared/http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/shared/http.cpp b/src/engine/shared/http.cpp index c89dad459..b3d93f3c2 100644 --- a/src/engine/shared/http.cpp +++ b/src/engine/shared/http.cpp @@ -271,7 +271,7 @@ int CHttpRequest::RunImpl(CURL *pUser) if(Ret != CURLE_OK) { if(g_Config.m_DbgCurl || m_LogProgress >= HTTPLOG::FAILURE) - dbg_msg("http", "%s failed. libcurl error: %s", m_aUrl, aErr); + dbg_msg("http", "%s failed. libcurl error (%d): %s", m_aUrl, (int)Ret, aErr); return (Ret == CURLE_ABORTED_BY_CALLBACK) ? HTTP_ABORTED : HTTP_ERROR; } else