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;
602
602
/// Please use HTTP 2 without HTTP/1.1 Upgrade
603
603
/// (Added in CURL 7.49.0)
604
604
pub 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 ;
605
608
606
609
// Note that the type here is wrong, it's just intended to just be an enum.
607
610
pub const CURL_SSLVERSION_DEFAULT : CURLoption = 0 ;
Original file line number Diff line number Diff line change @@ -461,6 +461,17 @@ pub enum HttpVersion {
461
461
/// (Added in CURL 7.49.0)
462
462
V2PriorKnowledge = curl_sys:: CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE as isize ,
463
463
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
+
464
475
/// Hidden variant to indicate that this enum should not be matched on, it
465
476
/// may grow over time.
466
477
#[ doc( hidden) ]
Original file line number Diff line number Diff line change @@ -70,6 +70,12 @@ fn main() {
70
70
_ => { }
71
71
}
72
72
}
73
+ if version < 66 {
74
+ match s {
75
+ "CURL_HTTP_VERSION_3" => return true ,
76
+ _ => { }
77
+ }
78
+ }
73
79
if version < 65 {
74
80
match s {
75
81
"CURLVERSION_SIXTH" => return true ,
You can’t perform that action at this time.
0 commit comments