From 94e0c9205e6049c6b3295145af7fd39156e77543 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Wed, 3 Aug 2022 08:51:28 -0400 Subject: add upstream 11.23 --- libcurl/curl_wrap.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libcurl') diff --git a/libcurl/curl_wrap.cpp b/libcurl/curl_wrap.cpp index 33723d9e..61c36404 100644 --- a/libcurl/curl_wrap.cpp +++ b/libcurl/curl_wrap.cpp @@ -246,7 +246,7 @@ HttpSession::Result HttpSession::perform(const std::string& serverRelPath, //WTF: curl_easy_perform() considers FTP response codes 4XX, 5XX as failure, but for HTTP response codes 4XX are considered success!! CONSISTENCY, people!!! //=> at least libcurl is aware: CURLOPT_FAILONERROR: "request failure on HTTP response >= 400"; default: "0, do not fail on error" //https://curl.haxx.se/docs/faq.html#curl_doesn_t_return_error_for_HT - //=> Curiously Google also screws up in their REST API design and returns HTTP 4XX status for domain-level errors! + //=> BUT Google also screws up in their REST API design and returns HTTP 4XX status for domain-level errors! https://blog.slimjim.xyz/posts/stop-using-http-codes/ //=> let caller handle HTTP status to work around this mess! if (userCallbackException) @@ -381,9 +381,10 @@ std::wstring zen::formatCurlStatusCode(CURLcode sc) ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PROXY); ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CLIENTCERT); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNRECOVERABLE_POLL); ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST); } - static_assert(CURL_LAST == CURLE_SSL_CLIENTCERT + 1); + static_assert(CURL_LAST == CURLE_UNRECOVERABLE_POLL + 1); return replaceCpy(L"Curl status %x", L"%x", numberTo(static_cast(sc))); } -- cgit