if (!route.getTargetHost().equals(newTarget)) {
final AuthState targetAuthState = localContext.getTargetAuthState();
if (this.log.isDebugEnabled()) {
this.log.debug("[exchange: " + state.getId() + "] Resetting target auth state");
}
targetAuthState.reset();
final AuthState proxyAuthState = localContext.getProxyAuthState();
final AuthScheme authScheme = proxyAuthState.getAuthScheme();
if (authScheme != null && authScheme.isConnectionBased()) {
if (this.log.isDebugEnabled()) {
this.log.debug("[exchange: " + state.getId() + "] Resetting proxy auth state");