hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1565676 - in /httpcomponents/httpclient/branches/4.3.x: RELEASE_NOTES.txt httpclient/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java
Date Fri, 07 Feb 2014 15:15:58 GMT
Author: olegk
Date: Fri Feb  7 15:15:58 2014
New Revision: 1565676

URL: http://svn.apache.org/r1565676
Log:
HTTPCLIENT-1456: Request retrial after status 503 causes ClientProtocolException

Modified:
    httpcomponents/httpclient/branches/4.3.x/RELEASE_NOTES.txt
    httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java

Modified: httpcomponents/httpclient/branches/4.3.x/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/RELEASE_NOTES.txt?rev=1565676&r1=1565675&r2=1565676&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/branches/4.3.x/RELEASE_NOTES.txt Fri Feb  7 15:15:58 2014
@@ -1,3 +1,14 @@
+Changes since 4.3.2
+-------------------
+
+Changelog:
+-------------------
+
+* [HTTPCLIENT-1456] Request retrial after status 503 causes ClientProtocolException.
+  Contributed by Oleg Kalnichevski <olegk at apache.org>
+
+
+
 Release 4.3.2
 -------------------
 

Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java?rev=1565676&r1=1565675&r2=1565676&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java
(original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java
Fri Feb  7 15:15:58 2014
@@ -32,6 +32,7 @@ import java.io.InterruptedIOException;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.http.Header;
 import org.apache.http.HttpException;
 import org.apache.http.annotation.Immutable;
 import org.apache.http.client.ServiceUnavailableRetryStrategy;
@@ -76,6 +77,7 @@ public class ServiceUnavailableRetryExec
             final HttpRequestWrapper request,
             final HttpClientContext context,
             final HttpExecutionAware execAware) throws IOException, HttpException {
+        final Header[] origheaders = request.getAllHeaders();
         for (int c = 1;; c++) {
             final CloseableHttpResponse response = this.requestExecutor.execute(
                     route, request, context, execAware);
@@ -92,6 +94,7 @@ public class ServiceUnavailableRetryExec
                             throw new InterruptedIOException();
                         }
                     }
+                    request.setHeaders(origheaders);
                 } else {
                     return response;
                 }



Mime
View raw message