http-extensions
http-extensions copied to clipboard
Retrofit: Alt-Svc is a list not a dictionary
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"
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.
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?