You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2009/10/26 14:34:25 UTC

svn commit: r829790 - in /httpcomponents/httpclient/branches/4.0.x: RELEASE_NOTES.txt httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java

Author: olegk
Date: Mon Oct 26 13:34:25 2009
New Revision: 829790

URL: http://svn.apache.org/viewvc?rev=829790&view=rev
Log:
HTTPCLIENT-882: Auth state is not correctly updated if a successful NTLM authentication results in a redirect

Modified:
    httpcomponents/httpclient/branches/4.0.x/RELEASE_NOTES.txt
    httpcomponents/httpclient/branches/4.0.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java

Modified: httpcomponents/httpclient/branches/4.0.x/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.0.x/RELEASE_NOTES.txt?rev=829790&r1=829789&r2=829790&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.0.x/RELEASE_NOTES.txt (original)
+++ httpcomponents/httpclient/branches/4.0.x/RELEASE_NOTES.txt Mon Oct 26 13:34:25 2009
@@ -2,6 +2,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 

Modified: httpcomponents/httpclient/branches/4.0.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.0.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java?rev=829790&r1=829789&r2=829790&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.0.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java (original)
+++ httpcomponents/httpclient/branches/4.0.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRequestDirector.java Mon Oct 26 13:34:25 2009
@@ -942,6 +942,11 @@
                     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();