-
"HTTP/3 please". Attempt to use HTTP/3 but fallback to h1/h2 if h3 does not work. This option makes curl try h3 first and if that has not succeeded after N milliseconds, a second attempt using TLS+TCP is initiated and then the first to connect wins and is used. This might then also make h3 not get used if it is too slow. In a future, if a significant portion of servers run HTTP/3, we could consider enabling this option by default.
-
"HTTP/3 only". Only try HTTP/3 against the given server and fail if h3 was not availble or otherwise possible.
-
alt-svc. The alt-svc options are already there, supported and work for HTTP/3 as well. However, the alt-svc logic in curl still lacks proper fallback on failures.
This means there is no way to ask for HTTP/3 but if it fails, insist on HTTP/1.1 (avoid HTTP/2) but I cannot see any good reason to insist on having that.
We provide --http3
and --http3-only
(via PR10264) for the tool. One option with fallback and another without.
Those two option have their exact counterparts in libcurl's CURLOPT_HTTP_VERSION
option:
CURL_HTTP_VERSION_3
with fallbackCURL_HTTP_VERSION_3ONLY
without fallback
Rework the HTTP version selection for the command line tool:
- drop the two separate HTTP/3 options
- introduce
--http-version [spec]
where[spec]
part can be a range, or a single version with some minor restrictions
With a litle luck, this option replaces all the other HTTP selection options.
[max version]-[lowest version]
- For example3-2
allows version 3 or 2.[max version]-
- For example3-
, use version three and allow curl to select any lower version[version]
- For example3
, use version three do not accept any other version
Mark HTTP/3 support non-eperimental