[Bug libgcj/14013] HttpURLConnection.receiveReply() does not deal with code only responses
k dot allan-gcc at au dot darkbluesea dot com
gcc-bugzilla@gcc.gnu.org
Wed Feb 4 06:48:00 GMT 2004
------- Additional Comments From k dot allan-gcc at au dot darkbluesea dot com 2004-02-04 06:48 -------
The code only responses that some HTTP servers can send back will cause
recieveReply to fail with a "Server reply was unparseable" IOException.
Commonly webserver repsponses will emit a status code, and a reason phrase as
for example:
HTTP/1.1 404 Not Found
or
HTTP/1.1 200 OK
This however is not required by RFC2616 (HTTP/1.1), It lists the reason phrase
as optional, and some webservers actually serve out only the status code without
a reason phrase.
When this is the case, the GCJ version of HttpURLConnection.receiveReply() fails
with an IOException of "Server reply was unparseable".
Attached is a patch that will rectify this problem.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|HttpURLConnection.receiveRep|HttpURLConnection.receiveRep
|ly |ly() does not deal with code
| |only responses
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14013
More information about the Gcc-bugs
mailing list