"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/impl/execchain/RedirectExec.java" between
httpcomponents-client-4.5.5-src.tar.gz and httpcomponents-client-4.5.6-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources. (Web) Server ("httpd").

RedirectExec.java  (httpcomponents-client-4.5.5-src):RedirectExec.java  (httpcomponents-client-4.5.6-src)
skipping to change at line 43 skipping to change at line 43
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.HttpEntityEnclosingRequest;
import org.apache.http.HttpException; import org.apache.http.HttpException;
import org.apache.http.HttpHost; import org.apache.http.HttpHost;
import org.apache.http.HttpRequest; import org.apache.http.HttpRequest;
import org.apache.http.ProtocolException; import org.apache.http.ProtocolException;
import org.apache.http.annotation.Contract; import org.apache.http.annotation.Contract;
import org.apache.http.annotation.ThreadingBehavior; import org.apache.http.annotation.ThreadingBehavior;
import org.apache.http.auth.AuthScheme;
import org.apache.http.auth.AuthState; import org.apache.http.auth.AuthState;
import org.apache.http.client.RedirectException; import org.apache.http.client.RedirectException;
import org.apache.http.client.RedirectStrategy; import org.apache.http.client.RedirectStrategy;
import org.apache.http.client.config.RequestConfig; import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpExecutionAware; import org.apache.http.client.methods.HttpExecutionAware;
import org.apache.http.client.methods.HttpRequestWrapper; import org.apache.http.client.methods.HttpRequestWrapper;
import org.apache.http.client.protocol.HttpClientContext; import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.client.utils.URIUtils; import org.apache.http.client.utils.URIUtils;
import org.apache.http.conn.routing.HttpRoute; import org.apache.http.conn.routing.HttpRoute;
skipping to change at line 149 skipping to change at line 148
} }
// Reset virtual host and auth states if redirecting to anot her host // Reset virtual host and auth states if redirecting to anot her host
if (!currentRoute.getTargetHost().equals(newTarget)) { if (!currentRoute.getTargetHost().equals(newTarget)) {
final AuthState targetAuthState = context.getTargetAuthS tate(); final AuthState targetAuthState = context.getTargetAuthS tate();
if (targetAuthState != null) { if (targetAuthState != null) {
this.log.debug("Resetting target auth state"); this.log.debug("Resetting target auth state");
targetAuthState.reset(); targetAuthState.reset();
} }
final AuthState proxyAuthState = context.getProxyAuthSta te(); final AuthState proxyAuthState = context.getProxyAuthSta te();
if (proxyAuthState != null) { if (proxyAuthState != null && proxyAuthState.isConnectio
final AuthScheme authScheme = proxyAuthState.getAuth nBased()) {
Scheme(); this.log.debug("Resetting proxy auth state");
if (authScheme != null && authScheme.isConnectionBas proxyAuthState.reset();
ed()) {
this.log.debug("Resetting proxy auth state");
proxyAuthState.reset();
}
} }
} }
currentRoute = this.routePlanner.determineRoute(newTarget, c urrentRequest, context); currentRoute = this.routePlanner.determineRoute(newTarget, c urrentRequest, context);
if (this.log.isDebugEnabled()) { if (this.log.isDebugEnabled()) {
this.log.debug("Redirecting to '" + uri + "' via " + cur rentRoute); this.log.debug("Redirecting to '" + uri + "' via " + cur rentRoute);
} }
EntityUtils.consume(response.getEntity()); EntityUtils.consume(response.getEntity());
response.close(); response.close();
} else { } else {
 End of changes. 2 change blocks. 
9 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)