hc-commits mailing list archives

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

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

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

Modified: httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt?rev=1565678&r1=1565677&r2=1565678&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/trunk/RELEASE_NOTES.txt Fri Feb  7 15:16:28 2014
@@ -4,6 +4,9 @@ Changes for 4.4-alpha1
 Changelog:
 -------------------
 
+* [HTTPCLIENT-1456] Request retrial after status 503 causes ClientProtocolException.
+  Contributed by Oleg Kalnichevski <olegk at apache.org>
+
 * [HTTPCLIENT-1454] Make connection operator APIs public.
   Contributed by Tamas Cservenak <tamas at cservenak.net>
 

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java?rev=1565678&r1=1565677&r2=1565678&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java
Fri Feb  7 15:16:28 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;
@@ -77,6 +78,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);
@@ -93,6 +95,7 @@ public class ServiceUnavailableRetryExec
                             throw new InterruptedIOException();
                         }
                     }
+                    request.setHeaders(origheaders);
                 } else {
                     return response;
                 }



Mime
View raw message