hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r723813 - in /httpcomponents/httpclient/trunk: RELEASE_NOTES.txt module-client/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
Date Fri, 05 Dec 2008 18:54:23 GMT
Author: olegk
Date: Fri Dec  5 10:54:23 2008
New Revision: 723813

URL: http://svn.apache.org/viewvc?rev=723813&view=rev
Log:
Fixed NPE in DefaultRequestDirector thrown when retrying a failed request over a proxied connection

Modified:
    httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java

Modified: httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt?rev=723813&r1=723812&r2=723813&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/trunk/RELEASE_NOTES.txt Fri Dec  5 10:54:23 2008
@@ -9,6 +9,10 @@
 
 All upstream projects are strongly encouraged to upgrade.
 
+* Fixed NPE in DefaultRequestDirector thrown when retrying a failed 
+  request over a proxied connection. 
+  Contributed by Oleg Kalnichevski <olegk at apache.org>
+
 * [HTTPCLIENT-803] Fixed bug in SSL host verifier implementations 
   causing the SSL certificate to be rejected as invalid if the connection 
   is established using an IP address.

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java?rev=723813&r1=723812&r2=723813&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
Fri Dec  5 10:54:23 2008
@@ -434,12 +434,18 @@
                             managedConn.open(route, context, params);
                         } else {
                             // otherwise give up
+                            this.log.debug("Proxied connection. Need to start over.");
                             retrying = false;
                         }
                         
                     }
 
                 }
+                
+                if (response == null) {
+                    // Need to start over
+                    continue;
+                }
 
                 // Run response protocol interceptors
                 response.setParams(params);



Mime
View raw message