This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/14013] HttpURLConnection.receiveReply() does not deal with code only responses


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]