hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19235] - Problem with redirect on HEAD when (bad, naughty) server returns body content
Date Mon, 05 May 2003 12:31:48 GMT
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=19235>.
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=19235

Problem with redirect on HEAD when (bad, naughty) server returns body content





------- Additional Comments From eric@tibco.com  2003-05-05 12:31 -------
Part of the difficulty with the HEAD response is that it is _supposed_ to
indicate a content length if available, but not return any content.  If
HttpClient attempts to treat the HEAD method like any other, that would mean, of
course, that HttpClient would attempt to consume the indicated length of
content, even though in most cases it will never be there.  Badness ensues.

If you want to recover from an HTTP server that erroneously returns content on a
HEAD request, it might be better to improve the code that scans for the HTTP
response line - for example by looking for "HTTP/1.0" or "HTTP/1.1" in the input
stream, rather than CR+LF+"HTTP", which presupposes that a response with extra
data would be so kind as to terminate with a CR/LF.

Mime
View raw message