Re: Is “fr, en; q=0.3” a valid Accept-Language value?

Thanks so much that is really helpful. I didn't know there was a new
RFC, and I did look.. I couldn't find it.

On 19 October 2016 at 19:32, Julian Reschke <julian.reschke@gmx.de> wrote:
> On 2016-10-19 02:31, Samuel Williams wrote:
>>
>> According to the RFC, it's okay to have *LWS between words and
>> separators. However, if you look at the specific ABNF for matching the
>> Accept-Language field, it doesn't allow for whitespace around the ;
>> character.
>>
>> Here is the exact LWS specification:
>>
>> implied *LWS: The grammar described by this specification is
>> word-based. Except where noted otherwise, linear white space (LWS) can
>> be included between any two adjacent words (token or quoted-string),
>> and between adjacent words and separators, without changing the
>> interpretation of a field. At least one delimiter (LWS and/or
>> separators) MUST exist between any two tokens (for the definition of
>> "token" below), since they would otherwise be interpreted as a single
>> token.
>>
>> Here is the ABNF grammar:
>>
>>    Accept-Language = "Accept-Language" ":"
>>                      1#( language-range [ ";" "q" "=" qvalue ] )
>>    language-range  = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )
>>
>> Any advice would be appreciated. Thanks
>
>
> a) Look at the current spec, not RFC 2616.
>
> b) Over there you will find:
>
>>   weight = OWS ";" OWS "q=" qvalue
>>   qvalue = ( "0" [ "." 0*3DIGIT ] )
>>          / ( "1" [ "." 0*3("0") ] )
>
>
>
> <https://greenbytes.de/tech/webdav/rfc7231.html#quality.values>
>
> Best regards, Julian
>

Received on Wednesday, 19 October 2016 10:04:11 UTC