You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2003/05/05 18:38:39 UTC
DO NOT REPLY [Bug 19635] -
GET an image without any Headers causes HttpRecoverableException
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=19635>.
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=19635
GET an image without any Headers causes HttpRecoverableException
------- Additional Comments From jsdever@apache.org 2003-05-05 16:38 -------
The problem is not the headers, its the status line. This webserver (which I
was unable to identify) is not sending the status line, which is not optional
according to rfc2616:
6 Response
After receiving and interpreting a request message, a server responds
with an HTTP response message.
Response = Status-Line ; Section 6.1
*(( general-header ; Section 4.5
| response-header ; Section 6.2
| entity-header ) CRLF) ; Section 7.1
CRLF
[ message-body ] ; Section 7.2
This webserver is not even sending out a preceeding CRLF. wget also has issues
with this:
$ wget http://hk.yimg.com//hk/providers/mingpao/20030403/30323plee-s.jpg
--11:56:30-- http://hk.yimg.com//hk/providers/mingpao/20030403/30323plee-s.jpg
=> `30323plee-s.jpg'
Resolving hk.yimg.com... done.
Connecting to hk.yimg.com[202.1.233.109]:80... connected.
HTTP request sent, awaiting response...
11:56:30 ERROR -1: Malformed status line.
This is clearly bad webserver behaviour. The question is wether we should be
accomodating of this behaviour. Currently the readStatusLine method in
HttpMethodBase keeps doing a readline untill HTTP is found or throws the above
exception if it is not. If we handle this broken webserver, we would have to
read as bytes and if it does not start with HTTP then assume that we are reading
the response body. Need to do somthing about reading the headers too as there
would be no expected CRLF. If this bad behaviour is accomodated, it should not
be acceptable in strict mode.