p2: section 5.3.2 (Accept header)

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