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

(wrong string) €“ Invalid example?

From: Hkan <hakan.canberger@gmail.com>
Date: Wed, 26 Oct 2011 14:12:04 +0200
Message-ID: <CAF0yRJtQ2+xxy5=ayUGHFkCDviKVtTBFs_Lr3rchmUoCdY_dGw@mail.gmail.com>
To: Julian Reschke <julian.reschke@gmx.de>
Cc: ietf-http-wg@w3.org
On Wed, Oct 26, 2011 at 10:35, Julian Reschke <julian.reschke@gmx.de> wrote:

> On 2011-10-25 22:19, Hkan wrote:
>
>> Hi.
>>
>
> Welcome to the Working Group.
>
>
>  I'm new to all this, so I'm sorry if I'm not following protocol (not
>> sure if I should open an Issue Ticket or start by mailing the group first)
>>
>
> Mailing to the list is the correct thing to do.
>
>
>  I've found examples that do not add up in p1-messaging 1.2.1.  ABNF
>> Extension: #rule
>>
>>  >   For compatibility with legacy list rules, recipients SHOULD accept
>>  >   empty list elements.  In other words, consumers would follow the list
>>  >   productions:
>>  >
>>  >     #element => [ ( "," / element ) *( OWS "," [ OWS element ] ) ]
>>  >
>>  >     1#element => *( "," OWS ) element *( OWS "," [ OWS element ] )
>> ...
>>  >  For example, given these ABNF productions:
>>  >
>>  >     example-list      = 1#example-list-elmt
>>  >     example-list-elmt = token ; see Section 3.2.3
>>  >
>>  >   Then these are valid values for example-list (not including the
>>  >   double quotes, which are present for delimitation only):
>>  >
>>  > "foo,bar"
>>  > " foo ,bar,"
>>  > "  foo , ,bar,charlie "
>>  > "foo ,bar,   charlie "
>>
>> token is defined as 1*tchar and tchar is one character from a set of
>> visible character. Since space is not a tchar, token cannot contain a
>> space.
>>
>
> Yes.
>
>
>  In the second example " foo, bar,", since token cannot contain spaces, I
>> cant see how a space can be the first character. Given that I've read
>> the ABNF correctly, the only allowable first character is "," or a
>> tchar. The only way a space can come before token is if it's following a
>> comma ",". So this would be valid: ", foo ,bar,"
>> The same problem exists in example 3 as well,
>>
>
>No. SP isn't part of token, but it *is* part of OWS.

Agree, but OWS do not start  #element or 1#element, hence a space cannot be
the first character.
And OWS cannot end a #element or 1#element so a space cannot be the last
character.

/Hkan
Received on Wednesday, 26 October 2011 12:12:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:51:49 GMT