diff options
author | B. Stack <bgstack15@gmail.com> | 2022-08-03 12:51:45 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-08-03 12:51:45 +0000 |
commit | 3f91181f8458cb6a6d95e25123db874875f7b259 (patch) | |
tree | c36c0f0c5fab7aa60432e9e1d32ba5fdfabeb55e /libcurl | |
parent | Merge branch '11.22' into 'master' (diff) | |
parent | add upstream 11.23 (diff) | |
download | FreeFileSync-3f91181f8458cb6a6d95e25123db874875f7b259.tar.gz FreeFileSync-3f91181f8458cb6a6d95e25123db874875f7b259.tar.bz2 FreeFileSync-3f91181f8458cb6a6d95e25123db874875f7b259.zip |
Merge branch 'b11.23' into 'master'11.23
add upstream 11.23
See merge request opensource-tracking/FreeFileSync!46
Diffstat (limited to 'libcurl')
-rw-r--r-- | libcurl/curl_wrap.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<std::wstring>(L"Curl status %x", L"%x", numberTo<std::wstring>(static_cast<int>(sc))); } |