W3C home > Mailing lists > Public > ietf-http-wg@w3.org > October to December 2016

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

From: Samuel Williams <space.ship.traveller@gmail.com>
Date: Wed, 19 Oct 2016 13:31:40 +1300
Message-ID: <CAHkN8V9RyAVprdWT2ZRDfDyCc+aj7Q6iJdGRr8N2m-qzEis7Kw@mail.gmail.com>
To: ietf-http-wg@w3.org
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
Received on Wednesday, 19 October 2016 00:32:10 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 19 October 2016 00:32:15 UTC