curl: Avoid using HTTP/2 with curl 8.7.x due to bug in error codes

curl 8.7.x has a bug in HTTP/2 error codes introduced by
commit `0dc036225` (HTTP/2: write response directly, 2024-01-31,
`curl-8_7_0~230`) and fixed by commit `5c59f9142` (http2 + ngtcp2:
pass CURLcode errors from callbacks, 2024-04-18, `curl-8_8_0~181`).

Fixes: #26200
This commit is contained in:
Brad King
2024-08-13 15:06:14 -04:00
parent d88682dff6
commit 7486f468fb
5 changed files with 18 additions and 4 deletions

View File

@@ -2117,7 +2117,7 @@ bool HandleDownloadCommand(std::vector<std::string> const& args,
::CURL* curl;
cmCurlInitOnce();
::curl_global_init(CURL_GLOBAL_DEFAULT);
curl = ::curl_easy_init();
curl = cm_curl_easy_init();
if (!curl) {
status.SetError("DOWNLOAD error initializing curl.");
return false;
@@ -2491,7 +2491,7 @@ bool HandleUploadCommand(std::vector<std::string> const& args,
::CURL* curl;
cmCurlInitOnce();
::curl_global_init(CURL_GLOBAL_DEFAULT);
curl = ::curl_easy_init();
curl = cm_curl_easy_init();
if (!curl) {
status.SetError("UPLOAD error initializing curl.");
fclose(fin);