W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2008

default for q-values in Accept-Language and elsewhere

From: Javier Godoy <rjgodoy@fich.unl.edu.ar>
Date: Wed, 7 May 2008 14:42:51 -0300
Message-ID: <000d01c8b069$c79c67f0$017ba8c0@Javier>
To: <ietf-http-wg@w3.org>

Julian Reschke wrote:

> I'd recommend that we state the default just once in the section that 
> introduces qvalues 
> (<http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p3-payload-latest.html#rfc.section.3.4>) 
> and remove the description everywhere else.

That makes sense, but the qvalue cannot default to nothing by itself.
Stating that "the qvalue defaults to 1" would mean that
"text/plain;q=" or "text/plain;q" is to be understood as  "text/plain;q=1"
because of the following ABNF:

[[
qvalue         = ( "0" [ "." 0*3DIGIT ] )
                   | ( "1" [ "." 0*3("0") ] )

Accept         = "Accept" ":"
                     #( media-range [ accept-params ] )

accept-params  = ";" "q" "=" qvalue *( accept-extension )
]]


Maybe we should introduce a "qparam" production, then the qparam (*not* the
qvalue) would default to q=1. I think it is more correct this way.

qparam = "q" "=" qvalue
accept-params  = ";" qparam *( accept-extension )

BTW, it is allowed having extension parameters *without* a q parameter? For
instance "text/plain;atoken=avalue"

In that case, the ABNF could be:

Accept  = "Accept" ":" #( media-range accept-params )
qparam = ";q" "=" qvalue
accept-params  = [qparam] *( accept-extension )


Hope that helps

Best Regards

Javier



----- Original Message ----- 
From: "" <julian.reschke@gmx.de>
To: "Adrien de Croy" <adrien@qbik.com>
Cc: "Martin Duerst" <duerst@it.aoyama.ac.jp>; "'HTTP Working Group'"
<ietf-http-wg@w3.org>; "LTRU Working Group" <ltru@ietf.org>
Sent: Wednesday, May 07, 2008 8:49 AM
Subject: Re: default for q-values in Accept-Language and elsewhere


>
> Adrien de Croy wrote:
>>> Looking at other subsections of Section 14, there is an explicit
>>> default of q=1 for Accept and Accept-Charset, but I also didn't
>>> find a default for Accept-Encoding.
>>>
>>> Please add this issue to your issue list unless you already
>>> have it listed.
>>>
>>
>> also the whole concept of q values only makes any sense if the default 
>> value is 1.
>> ...
>
>
> BR, Julian
>
>
Received on Wednesday, 7 May 2008 17:43:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:50:47 GMT