CMake/Source/cmCurl.h
Brad King 7486f468fb 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
2024-08-13 15:07:53 -04:00

23 lines
767 B
C++

/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#pragma once
#include "cmConfigure.h" // IWYU pragma: keep
#include <string>
#include <cm/optional>
#include <cm/string_view>
#include <cm3p/curl/curl.h>
void cmCurlInitOnce();
cm::optional<int> cmCurlParseTLSVersion(cm::string_view tls_version);
cm::optional<std::string> cmCurlPrintTLSVersion(int curl_tls_version);
std::string cmCurlSetCAInfo(::CURL* curl, const std::string& cafile = {});
std::string cmCurlSetNETRCOption(::CURL* curl, const std::string& netrc_level,
const std::string& netrc_file);
std::string cmCurlFixFileURL(std::string url);
::CURL* cm_curl_easy_init();