HTTPCLIENT-882: Auth state is not correctly updated if a successful NTLM authentication results in a redirect

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@829791 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2009-10-26 13:38:39 +00:00
parent eb1205a223
commit 96b8e1d936
2 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,11 @@
Changes since 4.0
-------------------
* [HTTPCLIENT-882] Auth state is not correctly updated if a successful NTLM
authentication results in a redirect. This is a minor bug as HttpClient manages
to recover from the problem automatically.
Contributed by Oleg Kalnichevski <olegk at apache.org>
* [HTTPCLIENT-881] Fixed race condition in AbstractClientConnAdapter that makes it
possible for an aborted connection to be returned to the pool.
Contributed by Tim Boemker <tboemker at elynx.com> and

View File

@ -951,6 +951,11 @@ public class DefaultRequestDirector implements RequestDirector {
uri.getPort(),
uri.getScheme());
// Unset auth scope
targetAuthState.setAuthScope(null);
proxyAuthState.setAuthScope(null);
// Invalidate auth states if redirecting to another host
if (!route.getTargetHost().equals(newTarget)) {
targetAuthState.invalidate();
AuthScheme authScheme = proxyAuthState.getAuthScheme();