Fixed NPE in DefaultRequestDirector thrown when retrying a failed request over a proxied connection

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@723813 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2008-12-05 18:54:23 +00:00
parent 9570849f9c
commit c6769986be
2 changed files with 10 additions and 0 deletions

View File

@ -9,6 +9,10 @@ bundle combining HttpClient and HttpMime jars.
All upstream projects are strongly encouraged to upgrade. 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 * [HTTPCLIENT-803] Fixed bug in SSL host verifier implementations
causing the SSL certificate to be rejected as invalid if the connection causing the SSL certificate to be rejected as invalid if the connection
is established using an IP address. is established using an IP address.

View File

@ -434,6 +434,7 @@ public class DefaultRequestDirector implements RequestDirector {
managedConn.open(route, context, params); managedConn.open(route, context, params);
} else { } else {
// otherwise give up // otherwise give up
this.log.debug("Proxied connection. Need to start over.");
retrying = false; retrying = false;
} }
@ -441,6 +442,11 @@ public class DefaultRequestDirector implements RequestDirector {
} }
if (response == null) {
// Need to start over
continue;
}
// Run response protocol interceptors // Run response protocol interceptors
response.setParams(params); response.setParams(params);
requestExec.postProcess(response, httpProcessor, context); requestExec.postProcess(response, httpProcessor, context);