Re: #428 Accept-Language ordering for identical qvalues

Amos Jeffries <> Fri, 18 January 2013 10:51 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C04CE21F88CA for <>; Fri, 18 Jan 2013 02:51:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 941Yr1Tuo4QH for <>; Fri, 18 Jan 2013 02:51:08 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 0A4F021F88BE for <>; Fri, 18 Jan 2013 02:51:00 -0800 (PST)
Received: from lists by with local (Exim 4.72) (envelope-from <>) id 1Tw9WB-00038z-Ft for; Fri, 18 Jan 2013 10:49:51 +0000
Resent-Date: Fri, 18 Jan 2013 10:49:51 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtp (Exim 4.72) (envelope-from <>) id 1Tw9W8-00036U-6j for; Fri, 18 Jan 2013 10:49:48 +0000
Received: from ([] by with esmtp (Exim 4.72) (envelope-from <>) id 1Tw9W7-0002ye-IP for; Fri, 18 Jan 2013 10:49:48 +0000
Received: from [] (unknown []) by (Postfix) with ESMTP id 774B6E712F; Fri, 18 Jan 2013 23:49:24 +1300 (NZDT)
Message-ID: <>
Date: Fri, 18 Jan 2013 23:49:20 +1300
From: Amos Jeffries <>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
MIME-Version: 1.0
To: Julian Reschke <>
CC: =?UTF-8?B?Ik1hcnRpbiBKLiBEw7xyc3Qi?= <>,
References: <> <> <> <> <> <> <> <> <>
In-Reply-To: <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=;;
X-W3C-Hub-Spam-Status: No, score=-1.7
X-W3C-Hub-Spam-Report: AWL=-1.725, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: 1Tw9W7-0002ye-IP 9ed2be20f3910c5e4d3c8c426558be97
Subject: Re: #428 Accept-Language ordering for identical qvalues
Archived-At: <>
X-Mailing-List: <> archive/latest/15994
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

On 18/01/2013 11:13 p.m., Julian Reschke wrote:
> On 2013-01-18 10:57, "Martin J. Dürst" wrote:
>> On 2013/01/18 18:07, Julian Reschke wrote:
>>> If the client sends
>>> Accept-Language: en, de
>>> and the server returns German text, although English would have been
>>> available, is it still compliant?
>> One way to claim compliance is to claim that the German text is of
>> higher quality. If there are no (or the same) q-values, then higher
>> quality on the server side wins.
> Let's assume for this argument that they are same quality.
>> So I'm with Roy (and now Amos) on this.
> I don't see how that follows from what you just said...
> Best regards, Julian

The server has potentially some idea of the translated % or quality of 
trust in each phrases translation.

Even putting that aside though:

Server A responds with German. Server B responds with German.
Which one was selecting randomly? which was responding with sequential 
search and missing English? you can't tell.

Likewise, if they return German and English respectively you still can't 
tell unless you are maintaining state and considering requests statefully.

Then you need to consider a server which does object translation based 
on the Accept-Language header. If it *were* to respond with random 
selection of language between those two and host an entire site 
translated into both. Users would end up getting a random language 
change on every page load as they navigated, potentially each of several 
components on a page in different languages. The random selection is 
*not* a good algorithm to use from this point of view and effecitively 
mandates stateful sessions just for the translation to work in a 
user-friendly way.

FWIW: Squid is able to do language negotiation on its generated 
responses fast and statelessly only by ignoring q-values and handling 
the list as ordered. Managing q-values or comparing the entire list 
against available languages increases the response processing costs by a 
factor of 6.