Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrofit: Alt-Svc is a list not a dictionary #2727

Open
LPardue opened this issue Jan 30, 2024 · 2 comments
Open

Retrofit: Alt-Svc is a list not a dictionary #2727

LPardue opened this issue Jan 30, 2024 · 2 comments
Labels

Comments

@LPardue
Copy link
Contributor

LPardue commented Jan 30, 2024

The field is a list where each tuple could share the same "key", and the order of tuples is a preference. Example from RFC 7838

The Alt-Svc field value can have multiple values:

Alt-Svc: h2="alt.example.com:8000", h2=":443"

@martinthomson
Copy link
Contributor

Alt-Svc fits poorly in either.

As a list, the =":443" part doesn't fit the grammar:

sf-list       = list-member *( OWS "," OWS list-member )
list-member   = sf-item / inner-list

As a dictionary, the potential for the same value to be used multiple times doesn't fit this:

There can be zero or more members, and their keys are unique in the scope of the Dictionary they occur within.

@LPardue
Copy link
Contributor Author

LPardue commented Jan 30, 2024

Yeah you're right. To do things right would probably call for mapping. Cookies has similar issues and defunes a mapping https://httpwg.org/http-extensions/draft-ietf-httpbis-retrofit.html#section-3.4

However, given the WG spent some time discussing killing of Alt-Svc maybe we shouldn't bother?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants