mirror of
https://github.com/curl/curl.git
synced 2026-08-26 21:24:08 +03:00
alt-svc: more flexibility on same destination
When the Alt-Svc points to the same host and port, add the destination ALPN to the `wanted` versions and set it also as the `preferred` version in negotiations. This allows Alt-Svc for h3 to point to h2 and have it tried first. Also, this allows Alt-Svc to say http/1.1 is preferred and changes the ALPN protocol ordering for the TLS handshake. Add tests in various combination to verify this works. Reported-by: yushicheng7788 on github Fixes #19740 Closes #19874
This commit is contained in:
parent
f450f3801b
commit
5ed7b5b01b
9 changed files with 135 additions and 49 deletions
|
|
@ -72,6 +72,7 @@ struct http_negotiation {
|
|||
unsigned char rcvd_min; /* minimum version seen in responses, 09, 10, 11 */
|
||||
http_majors wanted; /* wanted major versions when talking to server */
|
||||
http_majors allowed; /* allowed major versions when talking to server */
|
||||
http_majors preferred; /* preferred major version when talking to server */
|
||||
BIT(h2_upgrade); /* Do HTTP Upgrade from 1.1 to 2 */
|
||||
BIT(h2_prior_knowledge); /* Directly do HTTP/2 without ALPN/SSL */
|
||||
BIT(accept_09); /* Accept an HTTP/0.9 response */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue