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

p2: section 5.3.2 (Accept header)

From: Osama Mazahir <OSAMAM@microsoft.com>
Date: Thu, 9 May 2013 00:36:24 +0000
To: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Message-ID: <b3bef7bc7c2a4cc0b8d2849a38088bfb@SN2PR03MB046.namprd03.prod.outlook.com>
In section 5.3.1, the weight is defined as:

------------

     weight = OWS ";" OWS "q=" qvalue

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

            / ( "1" [ "." 0*3("0") ] )

------------



In section 5.3.2, the Accept header grammar is defined as:

------------

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



     media-range    = ( "*/*"

                      / ( type "/" "*" )

                      / ( type "/" subtype )

                      ) *( OWS ";" OWS parameter )

     accept-params  = weight *( accept-ext )

     accept-ext     = OWS ";" OWS token [ "=" word ]

------------



The grammar seems to imply that the weight is always the first parameter.  But then the example shows that the weight is not the first parameter (e.g. the level=2 case):

------------

     Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1,

             text/html;level=2;q=0.4, */*;q=0.5

------------



Which way is correct?



Thanks,

--Osama.
Received on Thursday, 9 May 2013 00:40:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:11:13 UTC