WICG / webpackage

Web packaging format
Other
1.23k stars 118 forks source link

variation based on content-language ? #527

Closed Jxck closed 5 years ago

Jxck commented 5 years ago

on 3.3.1. Parsing the index section https://wicg.github.io/webpackage/draft-yasskin-wpack-bundled-exchanges.html#index-section

For example, given a variants-value of Accept-Encoding;gzip;br, Accept-Language;en;fr;ja, the list of location-in-responses pairs will correspond to the VariantKeys:

it seems based on Content-Encoding/Language instead of Accept-Encoding/Language ?

twifkak commented 5 years ago

What makes you think it should be based on Content instead of Accept? AFAIK Variant is based on request headers. See, for instance: https://tools.ietf.org/html/draft-ietf-httpbis-variants-05#appendix-A.2

irori commented 5 years ago

This example is correct. Variants header field values are request header based, as @twifkak mentioned.

https://tools.ietf.org/html/draft-ietf-httpbis-variants-05#section-2

The Variants HTTP response header field indicates what representations are available for a given resource at the time that the response is produced, by enumerating the request header fields that it varies on, along with the values that are available for each.