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: Tue, 25 Oct 2011 22:19:13 +0200
Message-ID: <CAF0yRJtKRvwXOxkE+jZCkXVdNUtSFQbY2+DnDdyGXkz05-hmHQ@mail.gmail.com>
To: ietf-http-wg@w3.org
Hi.

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)


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.

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,

If we look at example 3 and example 4 they end with spaces. That's not
allowed. According to the rules they may only end on a tchar or ",".

I'm guessing the rules are correct, so the first and last spaces in example
2-4 should be removed.
     "foo,bar"
     "foo ,bar,"
     "foo , ,bar,charlie"
     "foo ,bar,   charlie"


I hope I didn't get this completely wrong.

Hkan Canberger
Received on Tuesday, 25 October 2011 20:20:18 GMT

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