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

Questions over examples for Variants #670

Closed
tunetheweb opened this issue Jul 18, 2018 · 1 comment
Closed

Questions over examples for Variants #670

tunetheweb opened this issue Jul 18, 2018 · 1 comment
Labels

Comments

@tunetheweb
Copy link

I'm confused with the examples in https://httpwg.org/http-extensions/draft-ietf-httpbis-variants.html

GET /foo HTTP/1.1
Host: www.example.com
Accept-Language: en;q=0.5, fr;q=1.0 

My (limited!) understand of this is it means "I'd prefer French, but next preference is English if French is not available".

The example response is this:

HTTP/1.1 200 OK
Content-Type: text/html
Content-Language: en
Vary: Accept-Language
Transfer-Encoding: chunked

[French content]

Why is the Content-Language: en but the content in French? The only way this would make sense is if it was French content aimed at English speakers (e.g. a French course for English speakers) but that's a bit of an edge case so presume that is that the intention here? Shouldn't the Content-Language either be fr, or the Content be in English so they match? It looks like it was in previous drafts but then it was flipped around, so not sure if this got missed or if I'm completely missing the point.

Moving on we have the new example using the same request:

GET /foo HTTP/1.1
Host: www.example.com
Accept-Language: en;q=0.5, fr;q=1.0

and the new response with the additional proposed syntax:

HTTP/1.1 200 OK
Content-Type: text/html
Content-Language: en
Vary: Accept-Language
Variants: Accept-Language;de;en;jp
Variant-Key: en
Transfer-Encoding: chunked

[French content]

Here it says there are German, English and Japanese versions (and no French version), and I've decided to send you the English version, and then it gives French content? Again should this be [English content]?

@mnot mnot added the variants label Oct 8, 2018
@mnot
Copy link
Member

mnot commented Oct 8, 2018

You're correct. I fixed this a while back but forgot to update this bug; please have a look again and if you still see an issue, please comment here.

Thanks!

@mnot mnot closed this as completed Oct 8, 2018
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

2 participants