comments in HTTP headers

They're a pain.  They're also ill-specified.

Section 4.2 has a definition of ctext that differs from RFC 822,
which also allows \ escapes of ( and ).

Also I'm unclear on which has precedence in HTTP, a comment or a
blank line in the header.  In other words, how do I parse this:

GET / HTTP/1.0
Accept: text/basic (this comment
will include a blank
[blank line]
line)
Accept: text/html
[blank line]

where "[blank line]" is what it says.

Does the blank line in the comment terminate the request, leaving an
ill-formed comment, or does the blank line outside the comment
terminate the request?  If the former, the server actually has to parse
comments on the fly so as to locate the blank line that actually
terminates the request.  Do any existing servers do that?  I doubt it.

Dave Kristol

Received on Monday, 10 April 1995 14:46:47 UTC