curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: HTTP/3 options

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 4 Jan 2023 09:08:46 +0100 (CET)

On Tue, 3 Jan 2023, Timothe Litt via curl-library wrote:

Thanks, this is certainly an interesting idea.

> --http=3 - use http3, fall back to 2, 1.1, 1.0, 0.9, ...

We don't use '='-separators in our option parser so unless we introduce it
now, it would rather be

   --http 3

"0.9" is never a version used in (curl) requests, it is prehistoric
*response*. I don't think should mix 0.9-acceptance into this option.

> --http=3.  use http3 or die
>
> --http=(3,1.1) - try http3, fall back to 1.1, 1.0...
>
> --http=(3,1.1.) - try http3, 1.1 or die
>
> --http=2. = Use http2 or die (roughly --http2 --http-prior-knowledge)

Maybe the period is a too subtle as a "stop" as it is also used in "1.1".

How about a slight tweak of the syntax:

  "3-" means version 3 or anything else that curl thinks is fine

  "3" means only version 3

  "3-2" means version 2 or fallback to 2 (excluding 1.1)

  "3-1.1" means version 3 or fallback to 2 or 1.1

  "3,1.1" means version or fallback to 1.1

  "1.0" means please use 1.0 (only)

Details:

  It cannot ever fallback to 1.0, so having "3-1.0" will not make curl
  actually try 1.0 in the request.

  Using "0.9" in the string would be invalid, it is never used in requests.

  We could accept version "1" as a shortcut for "1.1".

  This leaves room for expanding to a future version 4.

> alt-svc really should be internal to CURL - e.g. in ~/.curl-altsvc.cache or
> some such.

Maybe. That would introduce challenges when you run a bazillion different
concurrent curls, potentially with lots of different use cases and testing and
torturing internal and external sites.

Also, alt-svc as a technology does not seem to have a very bright future so
I'm not convinced it is worth us spending a lot of efforts on fine tuning how
to use this. The future rather looks like an updated header and use of the
HTTPS record.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-01-04