Index: HttpMethodBase.java =================================================================== RCS file: /home/cvspublic/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v retrieving revision 1.46 diff -u -u -r1.46 HttpMethodBase.java --- HttpMethodBase.java 8 Aug 2002 18:21:55 -0000 1.46 +++ HttpMethodBase.java 14 Aug 2002 01:33:14 -0000 @@ -489,7 +489,9 @@ log.trace("enter HttpMethodBase.processRequest(HttpState, HttpConnection)"); //try to do the write - for (int retryCount = 1; retryCount <= maxRetries; retryCount++) { + int retryCount = 0; + do { + retryCount++; if (log.isTraceEnabled()){ log.trace("Attempt number " + retryCount + " to write request"); } @@ -499,6 +501,9 @@ connection.open(); } writeRequest(state, connection); + used = true; //write worked, mark this method as used + break; //move onto the write + } catch (HttpRecoverableException httpre) { log.debug("Closing the connection."); connection.close(); @@ -509,11 +514,8 @@ throw httpre; } } - } + } while (retryCount <= maxRetries); - //at least the write has succeeded - used = true; - //try to do the read try { readResponse(state,connection);