hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r627483 - in /httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http: client/AuthState.java impl/client/DefaultClientRequestDirector.java
Date Wed, 13 Feb 2008 15:39:40 GMT
Author: olegk
Date: Wed Feb 13 07:39:37 2008
New Revision: 627483

URL: http://svn.apache.org/viewvc?rev=627483&view=rev
Log:
Do not attempt to update the auth state if not valid

Modified:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/AuthState.java
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/AuthState.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/AuthState.java?rev=627483&r1=627482&r2=627483&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/AuthState.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/AuthState.java
Wed Feb 13 07:39:37 2008
@@ -70,6 +70,10 @@
         this.credentials = null;
     }
 
+    public boolean isValid() {
+        return this.authScheme != null;
+    }
+    
     /**
      * Assigns the given {@link AuthScheme authentication scheme}.
      * 

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java?rev=627483&r1=627482&r2=627483&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultClientRequestDirector.java
Wed Feb 13 07:39:37 2008
@@ -985,6 +985,10 @@
             final HttpHost host,
             final CredentialsProvider credsProvider) {
         
+        if (!authState.isValid()) {
+            return;
+        }
+        
         String hostname = host.getHostName();
         int port = host.getPort();
         if (port < 0) {



Mime
View raw message