From d721d0535721648df3525a9011db19cc1921e508 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Thu, 24 Oct 2024 11:20:35 -0700 Subject: [PATCH] fix(http): Fix "Failed sending data to the peer" errors 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). --- packager/file/http_file.cc | 2 +- packager/third_party/curl/CMakeLists.txt | 2 +- packager/third_party/curl/source | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packager/file/http_file.cc b/packager/file/http_file.cc index b50fef6f072..dca43e26ca3 100644 --- a/packager/file/http_file.cc +++ b/packager/file/http_file.cc @@ -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; } diff --git a/packager/third_party/curl/CMakeLists.txt b/packager/third_party/curl/CMakeLists.txt index e4665ab102e..73fc42ace40 100644 --- a/packager/third_party/curl/CMakeLists.txt +++ b/packager/third_party/curl/CMakeLists.txt @@ -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() diff --git a/packager/third_party/curl/source b/packager/third_party/curl/source index 462196e6b4a..83bedbd730d 160000 --- a/packager/third_party/curl/source +++ b/packager/third_party/curl/source @@ -1 +1 @@ -Subproject commit 462196e6b4a47f924293a0e26b8e9c23d37ac26f +Subproject commit 83bedbd730d62b83744cc26fa0433d3f6e2e4cd6