Juan,

The one technique that I'm aware of for guaranteeing that the server only processes the request once is to put in some sort of transaction ID into the request, and the server will reject duplicate requests (hopefully with an appropriate error message).

In short, it is an "application" level problem, not something that HttpClient can help you with at the transport level. HttpClient can improve in ways that make such tricks needed less frequently, but it cannot eliminate the need for them. Hopefully, in your case, you can change the server code to support such a technique.

-Eric.

Juan Pedro López Sáez wrote:

Hello,

In case it is a server side issue, I would like be sure that the server
hasn't processed my request because I'm posting non idempotent requests.
If I retry the request but the first one was really processed I could be
in troubles.

I guess there is not a simple solution for this.

I include an excerpt of my httpclient log, in case you can get further
information.

Thank you very much.

Juan Pedro Lopez

------------------------------------------------
30 ago 2004 14:00:14,223 DEBUG [Thread-610] httpclient.wire - >>
"This is the post data I send"
30 ago 2004 14:00:14,223 DEBUG [Thread-610]
org.apache.commons.httpclient.methods.EntityEnclosingMethod  - Request
body sent
30 ago 2004 14:00:14,223 DEBUG [Thread-610]
org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.flushRequestOutputStream()
30 ago 2004 14:00:14,223 DEBUG [Thread-610]
org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readResponse(HttpState, HttpConnection)
30 ago 2004 14:00:14,223 DEBUG [Thread-610]
org.apache.commons.httpclient.HttpMethodBase - enter
HttpMethodBase.readStatusLine(HttpState, HttpConnection)
30 ago 2004 14:00:14,223 DEBUG [Thread-610]
org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.readLine()
30 ago 2004 14:00:14,223 DEBUG [Thread-610]
org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine()
30 ago 2004 14:00:14,223 DEBUG [Thread-610]
org.apache.commons.httpclient.HttpParser - enter
HttpParser.readRawLine()
30 ago 2004 14:00:14,288 DEBUG [Thread-610]
org.apache.commons.httpclient.HttpMethodBase - Closing the connection.
30 ago 2004 14:00:14,288 DEBUG [Thread-610]
org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.close()
30 ago 2004 14:00:14,288 DEBUG [Thread-610]
org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.closeSockedAndStreams()
30 ago 2004 14:00:14,288 INFO  [Thread-610]
org.apache.commons.httpclient.HttpMethodBase - Recoverable exception
caught when processing request
30 ago 2004 14:00:14,469 WARN  [Thread-610]
org.apache.commons.httpclient.HttpMethodBase - Recoverable exception
caught but MethodRetryHandler.retryMethod() returned false, rethrowing
exception
30 ago 2004 14:00:14,469 DEBUG [Thread-610]
org.apache.commons.httpclient.HttpConnection - enter
HttpConnection.releaseConnection()
30 ago 2004 14:00:14,469 DEBUG [Thread-610]
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager - enter
HttpConnectionManager.releaseConnection(HttpConnection)




Juan,

Most likely it is a server side issue. Take a look at this post. It
should explain the cause of the problem and can help find a fix for it


http://marc.theaimsgroup.com/?l=httpclient-commons-dev&m=109344163805313&w=2

Oleg

On Thu, 2004-09-09 at 10:24, Juan Pedro López Sáez wrote:


Hello all.

From time to time I'm getting the following exception in my application:

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:675) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:558)

How can I manage it in my application? Can I find out what's going
wrong? Is it a server side issue?

Thank you very much.

Juan Pedro Lopez




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


***************************************************************************************************
The information in this email is confidential and may be legally privileged.  Access 
to this email by anyone other than the intended addressee is unauthorized.  If you are 
not the intended recipient of this message, any review, disclosure, copying, 
distribution, retention, or any action taken or omitted to be taken in reliance on it 
is prohibited and may be unlawful.  If you are not the intended recipient, please 
reply to or forward a copy of this message to the sender and delete the message, any 
attachments, and any copies thereof from your system.
***************************************************************************************************

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





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





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



Reply via email to