W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2008

Implied LWS questions

From: Julian Reschke <julian.reschke@gmx.de>
Date: Fri, 06 Jun 2008 16:18:05 +0200
Message-ID: <4849471D.9040609@gmx.de>
To: HTTP Working Group <ietf-http-wg@w3.org>

<http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-latest.html#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."

<http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-latest.html#rfc.section.3.1>

"The version of an HTTP message is indicated by an HTTP-Version field in 
the first line of the message. HTTP-Version is case-sensitive.

   HTTP-Version   = "HTTP" "/" 1*DIGIT "." 1*DIGIT"

So, do "HTTP" and "/" qualify as instances of quoted-string?

What about 1*DIGIT? That's definitively not a quoted string, but it 
could be parsed as token.

So, after applying the implied LWS rule, what is the ABNF for HTTP-Version?

1) HTTP-Version = "HTTP" *LWS "/" *LWS 1*DIGIT *LWS "." *LWS 1*DIGIT

or

2) HTTP-Version = "HTTP" *LWS "/" 1*DIGIT "." 1*DIGIT


Looking futher down... In 
<http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-latest.html#rfc.section.3.2>, 
the specification imports BNF rules from RFC2396:

   absoluteURI   = <absoluteURI, defined in [RFC2396], Section 3>
   authority     = <authority, defined in [RFC2396], Section 3.2>
   fragment      = <fragment, defined in [RFC2396], Section 4.1>
   path-absolute = <abs_path, defined in [RFC2396], Section 3>
   port          = <port, defined in [RFC2396], Section 3.2.2>
   query         = <query, defined in [RFC2396], Section 3.4>
   relativeURI   = <relativeURI, defined in [RFC2396], Section 5>
   uri-host      = <host, defined in [RFC2396], Section 3.2.2>

...

   http-URL = "http:" "//" uri-host [ ":" port ]
              [ path-absolute [ "?" query ]]

So, does http-URL allow *LWS anywhere? It's certainly not supposed to, 
but I think the rules allow is between "http:" and "//".

I'd really like to make progress on the ABNF thingy, and thus get rid of 
the implied LWS rule, but I'm not totally sure how to proceed? (I came 
here because I attempted mechanical conversion, which led to these 
questions).

BR, Julian
Received on Friday, 6 June 2008 14:18:51 GMT

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