File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -659,6 +659,11 @@ void Session::SetHttpVersion(const HttpVersion& version) {
659659 curl_easy_setopt (curl_->handle , CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3);
660660 break ;
661661#endif
662+ #if LIBCURL_VERSION_NUM >= 0x075701 // 7.87.1, but corresponds to 7.88.0 tag
663+ case HttpVersionCode::VERSION_3_0_ONLY:
664+ curl_easy_setopt (curl_->handle , CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3ONLY);
665+ break ;
666+ #endif
662667
663668 default : // Should not happen
664669 throw std::invalid_argument (" Invalid/Unknown HTTP version type." );
Original file line number Diff line number Diff line change @@ -46,7 +46,14 @@ enum class HttpVersionCode {
4646 * Requires prior knowledge that the server supports HTTP 3.0 since there is no gracefully downgrade.
4747 * Fallback to HTTP 1.1 if negotiation fails.
4848 **/
49- VERSION_3_0
49+ VERSION_3_0,
50+ #endif
51+ #if LIBCURL_VERSION_NUM >= 0x075701 // 7.87.1, but corresponds to 7.88.0 tag
52+ /* *
53+ * Enforce HTTP 3.0 requests without fallback.
54+ * Requires prior knowledge that the server supports HTTP 3.0 since there is no gracefully downgrade.
55+ **/
56+ VERSION_3_0_ONLY
5057#endif
5158};
5259
You can’t perform that action at this time.
0 commit comments