File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -602,6 +602,9 @@ pub const CURL_HTTP_VERSION_2TLS: c_int = 4;
602602/// Please use HTTP 2 without HTTP/1.1 Upgrade
603603/// (Added in CURL 7.49.0)
604604pub const CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE : c_int = 5 ;
605+ /// Makes use of explicit HTTP/3 without fallback.
606+ /// (Added in CURL 7.66.0)
607+ pub const CURL_HTTP_VERSION_3 : c_int = 30 ;
605608
606609// Note that the type here is wrong, it's just intended to just be an enum.
607610pub const CURL_SSLVERSION_DEFAULT : CURLoption = 0 ;
Original file line number Diff line number Diff line change @@ -461,6 +461,17 @@ pub enum HttpVersion {
461461 /// (Added in CURL 7.49.0)
462462 V2PriorKnowledge = curl_sys:: CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE as isize ,
463463
464+ /// Setting this value will make libcurl attempt to use HTTP/3 directly to
465+ /// server given in the URL. Note that this cannot gracefully downgrade to
466+ /// earlier HTTP version if the server doesn't support HTTP/3.
467+ ///
468+ /// For more reliably upgrading to HTTP/3, set the preferred version to
469+ /// something lower and let the server announce its HTTP/3 support via
470+ /// Alt-Svc:.
471+ ///
472+ /// (Added in CURL 7.66.0)
473+ V3 = curl_sys:: CURL_HTTP_VERSION_3 as isize ,
474+
464475 /// Hidden variant to indicate that this enum should not be matched on, it
465476 /// may grow over time.
466477 #[ doc( hidden) ]
Original file line number Diff line number Diff line change @@ -70,6 +70,12 @@ fn main() {
7070 _ => { }
7171 }
7272 }
73+ if version < 66 {
74+ match s {
75+ "CURL_HTTP_VERSION_3" => return true ,
76+ _ => { }
77+ }
78+ }
7379 if version < 65 {
7480 match s {
7581 "CURLVERSION_SIXTH" => return true ,
You can’t perform that action at this time.
0 commit comments