Skip to content

Commit 2c9d100

Browse files
authored
fix(http): Fix "Failed sending data to the peer" errors (#1443)
Upgrading curl fixes errors like "Failed sending data to the peer" flooding the log. This is described upstream in curl/curl#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).
1 parent ed68e69 commit 2c9d100

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packager/file/http_file.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void HttpFile::SetupRequest() {
311311
curl_easy_setopt(curl, CURLOPT_POST, 1L);
312312
break;
313313
case HttpMethod::kPut:
314-
curl_easy_setopt(curl, CURLOPT_PUT, 1L);
314+
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
315315
break;
316316
}
317317

packager/third_party/curl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ add_subdirectory(source)
4545
# Our enabling of c-ares doesn't automatically set a dependency between libcurl
4646
# and c-ares. Fix that now.
4747
if(USE_ARES)
48-
target_link_libraries(libcurl c-ares)
48+
target_link_libraries(libcurl_static PUBLIC c-ares)
4949
endif()

packager/third_party/curl/source

Submodule source updated 4675 files

0 commit comments

Comments
 (0)