default for q-values in Accept-Language and elsewhere

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 UTC