hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Loren Siebert" <lo...@siebert.org>
Subject HttpRecoverableException: Error in parsing the status line...
Date Wed, 05 Feb 2003 04:32:26 GMT
I occasionally get this exception while trying to readResponse() from a
HttpMethodBase and am trying to learn more about why it happens, and what I
should do about it. I am using 2.0-a2. I have searched bugzilla and found
this bug [ http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13463 ] that
describes it as a race condition. I have searched the mailing list archive
and found this message [
http://archives.apache.org/eyebrowse/ReadMsg?listName=commons-httpclient-dev
@jakarta.apache.org&msgId=622169 ] that seems to describe it as a normal
course of behavior that one should handle via retry attempts.

This is the partial stack trace:
org.apache.commons.httpclient.HttpRecoverableException:
org.apache.commons.httpclient.HttpRecoverableException: Error in parsing the
status  line from the response: unable to find line starting with "HTTP/"
        at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.jav
a:1668)
        at
org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.j
ava:2322)
        at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:915
)

In general, what I am trying to do is re-use HTTP1.1 connections through the
MultiThreadedHttpConnectionManager. The server to which I connect has
Keep-Alive: Timeout set to 15 seconds. If I attempt to reuse the
HttpConnection within 15
seconds, all is well. If I wait longer than that, I get the exception shown
above. This makes me think that the socket is in fact closed already by the
server, and HttpMethodBase.execute() doesn't know about it.

Can anyone shed some light on this?

Thanks,
Loren





Mime
View raw message