fix(http): Fix "Failed sending data to the peer" errors (#1443)
Some checks are pending
Release / Update docs (push) Blocked by required conditions
Release / Update docker image (push) Blocked by required conditions
Release / Build (push) Blocked by required conditions
Release / Settings (push) Waiting to run
Release / release (push) Blocked by required conditions
Release / Compute latest release flag (push) Blocked by required conditions
Release / Artifacts (push) Blocked by required conditions
Release / Update NPM (push) Blocked by required conditions

Upgrading curl fixes errors like "Failed sending data to the peer" flooding the log.  This is described upstream in https://github.com/curl/curl/issues/10591 and fixed in curl 8.2.0.  Here we upgrade to curl 8.9.1 (latest as of today).

This required updating the way we attach c-ares to libcurl and updating CURLOPT_PUT (deprecated) to CURLOPT_UPLOAD (compatible equivalent AFAICT).
This commit is contained in:
Joey Parrish
2024-10-24 13:53:39 -07:00
committed by GitHub
parent ed68e69584
commit 2c9d100d44
3 changed files with 3 additions and 3 deletions

View File

@@ -311,7 +311,7 @@ void HttpFile::SetupRequest() {
curl_easy_setopt(curl, CURLOPT_POST, 1L);
break;
case HttpMethod::kPut:
curl_easy_setopt(curl, CURLOPT_PUT, 1L);
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
break;
}

View File

@@ -45,5 +45,5 @@ add_subdirectory(source)
# Our enabling of c-ares doesn't automatically set a dependency between libcurl
# and c-ares. Fix that now.
if(USE_ARES)
target_link_libraries(libcurl c-ares)
target_link_libraries(libcurl_static PUBLIC c-ares)
endif()