DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16864>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16864 NullPointerException thrown when invalid header encountered [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |commons-httpclient- | |[EMAIL PROTECTED] AssignedTo|commons-httpclient- |[EMAIL PROTECTED] |[EMAIL PROTECTED] | Target Milestone|--- |2.0 Beta 1 ------- Additional Comments From [EMAIL PROTECTED] 2003-02-07 02:35 ------- Interesting. Here is the response from the webserver (also attached for hexdump purposes): HTTP/1.1 404 The file was not found, even after searching on any extensions to the file name. The file does not exist or is read-protected. Server: Domino-Go-Webserver/4.6.2.8 Date: Fri, 07 Feb 2003 01:53:34 GMT Connection: close Accept-Ranges: bytes Content-Type: text/html Content-Length: 7731 Last-Modified: Fri, 07 Feb 2003 01:53:34 GMT The server is doing somthing very nasty to the status line. They appear to be using a custom response phrase that is supposed to be displayed directly to the client (which is OK). As the response phrase is so long, apparently they decided to break it by adding a '\n' in the phrase, and then seem to be relying on folded headers (by starting the next line with a blank) to keep it all together as one horrible Status-Line. But folded headers do not apply to the status line. The status line is not supposed to contain any CR or LF characters. Here is what RFC2616 has to say about it: 6.1 Status-Line The first line of a Response message is the Status-Line, consisting of the protocol version followed by a numeric status code and its associated textual phrase, with each element separated by SP characters. No CR or LF is allowed except in the final CRLF sequence. Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF Clearly the Domino-Go-Webserver IBM is using is in violation of the RFC. However, we should update HttpClient to be more leinent in this case. As adrian pointed out, the same issue would occur if there was simply an empty header. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]