On 03-Jan-23 11:24, Daniel Stenberg via curl-library wrote:
There are already many --http[0-9.]+ and --http*-*options. It's not easy for a user to sort out how they interact. Suspect the code has similar challenges :-)Hi team,I started to write down some ideas for two options to ask for HTTP/3 to be used by curl when we remove the experimental label for it. Hopefully during his coming spring.My notes exist only as a GitHub gist for now: https://gist.github.com/bagder/6475a32d7cdc0b54f2dd6545e9ded0ac Feel free to comment here or there.
Rather than adding more, perhaps it's time for some simplification. Something like:
--http (or simply https?:// in a URL) means try whatever CURL is built with, highest to lowest version, modulo any knowledge it may have from past attempts.
--http=3 - use http3, fall back to 2, 1.1, 1.0, 0.9, ... --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)e.g. the arg is a list of protocol versions to try. Implicit is try next lower, unless '.', which means 'stop on failure'
The existing options can be mapped into this scheme.alt-svc really should be internal to CURL - e.g. in ~/.curl-altsvc.cache or some such. The ma (max-age) value is enough for the cache expiration. Clearing the cache is a good option to have, but I don't see why curl would need user involvement otherwise.
--http says that the user wants something specific. So if the --http list omits a protocol, it doesn't matter if the alt-svc header/cache says it's available. That could be included in --verbose output to hint that there may be a newer (better?) option.
While the library can certainly continue to have endless options, the command line really should be more Do What I Mean, especially by default.
Timothe Litt ACM Distinguished Engineer -------------------------- This communication may not represent the ACM or my employer's views, if any, on the matters discussed.
OpenPGP_signature
Description: OpenPGP digital signature
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html