This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/14013] HttpURLConnection.receiveReply() does not deal with code only responses
- From: "k dot allan-gcc at au dot darkbluesea dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Feb 2004 06:48:42 -0000
- Subject: [Bug libgcj/14013] HttpURLConnection.receiveReply() does not deal with code only responses
- References: <20040204063233.14013.k.allan-gcc@au.darkbluesea.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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