W3C home > Mailing lists > Public > public-mobileok-checker@w3.org > May 2007

Raw HTTP Headers

From: Jo Rabin <jrabin@mtld.mobi>
Date: Thu, 24 May 2007 13:49:50 +0100
Message-ID: <C8FFD98530207F40BD8D2CAD608B50B4335F8D@mtldsvr01.DotMobi.local>
To: <public-mobileok-checker@w3.org>

We are currently assuming that moki will record the raw HTTP headers.

HttpClient in Jakarta Commons doesn't do that. The question is, do we
want to modify it so it does, or can we live without it.

In favour of living without it is, well, that it's no work. In favour of
having it, is that we are closer to being able to resolve questions of
mal-formed headers.

A quick review of the code shows that the headers are parsed in
HttpParser, and that even if you have a so-called wire trace enabled
this just serialises the parsed headers (in HttpMethodBase).

readLine is the method of HttpParser that we'd want to change to record
the raw data, I think. A trivial change I think. Though not sure I'd
know how to go about doing it.


PS Incidentally, if you are interested you will see that in parseHeaders
the treatment of lines starting with space or tab appears to be faulty.
Firstly because it allows a whitespace only line to end the headers,
rather than an empty line, and secondly because I think it messes up
handling of lines starting with space or tab - which are supposed to be
continuations of the previous header. If there was no previous header,
that is an error, I think, which it does not detect.
Received on Thursday, 24 May 2007 12:50:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:18 UTC