On Mon, May 23, 2011 at 12:55 PM, Robert Newson <[email protected]> wrote:
> I filed a ticket (COUCHDB-1175) to track this. I'm concerned about
> changes to multiple branches with no ticket (this is just one example,
> there are others).
>
> This fix seems insufficient to me. Should we find out the q-value of
> 'application/json' and 'text/plain' and use whichever is higher? The
> mere presence of 'application/json' is not sufficient to decide if
> it's prefered.
I don't think there's a serious issue.
The mochiweb request function accepts_content_encoding/1 takes q=0
values into account. So that means if the Accept header is like for
example:
"Accept: text/plain, application/json; q=0"
or
"Accept: text/plain, application/*; q=0, */*; q=1"
and we call Req:accepts_content_encoding("application/json"), it will
return false for both cases
As for Q values > 0, HTTP spec [1] seems to say that for all values
the client lists with q > 0, the server can decide which one it wants,
not necessarily the one with highest q value.
[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
>
> B.
>
> On 23 May 2011 12:40, Filipe David Manana <[email protected]> wrote:
>> On Mon, May 23, 2011 at 7:46 AM, Benoit Chesneau <[email protected]> wrote:
>>>
>>> We should probably merged it in 1.1.x too since it fixes a regression
>>> compared to 1.0.x
>>
>> I haven't tested it, only looked at the diff, but it looks ok to me.
>>
>>>
>>> - benoît
>>>
>>
>>
>>
>> --
>> Filipe David Manana,
>> [email protected], [email protected]
>>
>> "Reasonable men adapt themselves to the world.
>> Unreasonable men adapt the world to themselves.
>> That's why all progress depends on unreasonable men."
>>
>
--
Filipe David Manana,
[email protected], [email protected]
"Reasonable men adapt themselves to the world.
Unreasonable men adapt the world to themselves.
That's why all progress depends on unreasonable men."