Hi,

I've been searching in the archive list looking for something related to
my "unable to find line starting with HTTP". 

There are lots of comments about it, but they all seem to be unuseful
for me.

Currently I'm using 2.0-rc3 version. My HTTP client is very simple.
Below you can see everything I do. That code is executed everytime I
need to send new data to the HTTP server.

--------------------------------------

HttpClient client= new HttpClient();
client.setStrictMode(true);
client.setTimeout(120000); 
client.setConnectionTimeout(10000); 

PostMethod post = new PostMethod(currentURL);
post.setRequestContentLength(XMLRequest.length());
post.setRequestBody(XMLRequest);
post.setRequestHeader("Content-type", "text/xml; charset=ISO-8859-1");
post.addRequestHeader("Connection", "close");

String response;

try{
httpStatus = client.executeMethod(post);
response = post.getResponseBodyAsString();
}
catch (HttpException e) {
log.fatal("IOException in client.executeMethod( post )",e);
throw e;
}
catch(IOException e){ 
log.fatal("IOException in client.executeMethod( post )",e);
throw e;
}
finally {
post.releaseConnection();
}

------------------------------------------------

I'm getting the exception in the HttpClient.excetuteMethod line. The
exception happens from time to time, is not quite common but I don't
know what to do with it.  

The exception stack trace is the following:

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.java:1965)
at
org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2659)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1093)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:674)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:529)

I would apreciate any help.

Thank you very much

Juan Pedro López




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to