incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1076220 - /sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/http/RequestExecutor.java
Date Wed, 02 Mar 2011 13:52:01 GMT
Author: bdelacretaz
Date: Wed Mar  2 13:52:01 2011
New Revision: 1076220

URL: http://svn.apache.org/viewvc?rev=1076220&view=rev
Log:
SLING-1963 - do not use null credentials

Modified:
    sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/http/RequestExecutor.java

Modified: sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/http/RequestExecutor.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/http/RequestExecutor.java?rev=1076220&r1=1076219&r2=1076220&view=diff
==============================================================================
--- sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/http/RequestExecutor.java
(original)
+++ sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/http/RequestExecutor.java
Wed Mar  2 13:52:01 2011
@@ -115,7 +115,11 @@ public class RequestExecutor {
             // And add request interceptor to have preemptive authentication
             httpClient.addRequestInterceptor(new PreemptiveAuthInterceptor(), 0);
         } else {
-            httpClient.getCredentialsProvider().setCredentials(AuthScope.ANY, null);
+            // Make sure existing credentials are not reused - but looks like we
+            // cannot set null as credentials
+            httpClient.getCredentialsProvider().setCredentials(
+                    AuthScope.ANY,
+                    new UsernamePasswordCredentials(getClass().getName(), getClass().getSimpleName()));
             httpClient.removeRequestInterceptorByClass(PreemptiveAuthInterceptor.class);
         }
         



Mime
View raw message