Subject: Accept-Language language tag order

From: "Gordon P. Hemsley" <[email-masked]>
Date: Sat, 28 Apr 2012 16:04:10 -0400

Hello all,

Back in November, there was a discussion [1] about the priority of
language tag order in the Accept-Language header. The discussion
centered around whether the order of language tags with equal quality
values (usually 1) was significant, and it seemed the consensus was to
not change the spec to say that they were, since most browser UAs
tended to send quality values correctly and changing the semantics of
the spec requires extreme circumstances.

However, I wonder if it might be beneficial to put a SHOULD in the
spec suggesting that UAs to sort the language tags in descending
quality order. I think most UAs already do this, and a SHOULD leaves
enough leeway for those who implemented the old standard, where things
were left ambiguous.

One argument against changing the spec was the desire to not have
exceptions that do not apply to all Accept headers. Thus, I recommend
that the same change be made for all Accept headers: items in a list
SHOULD be listed in descending quality value order.

(I haven't read the entire spec, so maybe this is already specified
somewhere, but I couldn't find it when I was looking for it.)

Thoughts?

Gordon

P.S. I'm not subscribed to this list, so please CC me on all relevant
discussion.

[1] http://lists.w3.org/Archives/Public/ietf-http-wg/2011OctDec/thread.html#msg223

-- 
Gordon P. Hemsley
[email-masked]
http://gphemsley.org/ • http://gphemsley.org/blog/

---

From: Julian Reschke <[email-masked]>
Date: Mon, 04 Jun 2012 18:16:17 +0200

On 2012-06-04 17:59, Gordon P. Hemsley wrote:
> ...
>>> Are there reasons not to do this?
>>
>> The order is not significant. It never was. If w etry to help broken
>> recipients we will break senders that do not sort.
>>
>> That's a normative change for which I simply see no compelling reason.
>
> Well, I'm confused: I thought SHOULD meant that it was preferred, but
> not required. How would that break senders who do not sort?
> ...

They wouldn't be conforming anymore; you may want to read RFC 2219 and 
the definition of "SHOULD".

BTW this exactly why we're trying to reduce the amount of SHOULDs in the 
spec.

Best regards, Julian

---

From: Julian Reschke <[email-masked]>
Date: Mon, 04 Jun 2012 17:54:30 +0200

On 2012-06-04 17:49, Gordon P. Hemsley wrote:
> Julian,
>
> Thanks for responding to my message. (I guess it just got through the queue?)

Apparently.

> Anecdotally, a lot of implementations assume that the order of
> language tags in Accept-Language are sorted by order of priority

Which?

> (highest to lowest). And indeed, the major implementations do just
> this.
>
> However, there is currently no requirement that this be the case.
> (And, for backwards compatibility, there cannot be a MUST.)
>
> I think it would be beneficial going forward that implementations sort
> the language tags in this manner, and I think putting a SHOULD in the
> new spec would remind them of this without strictly requiring them to
> do it.
>

Best regards, Julian

---

From: Julian Reschke <[email-masked]>
Date: Mon, 04 Jun 2012 16:56:13 +0200

> enough leeway for those who implemented the old standard, where things

Could you explain how that would help?

Best regards, Julian