You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2011/03/02 14:52:01 UTC
svn commit: r1076220 -
/sling/trunk/testing/tools/src/main/java/org/apache/sling/testing/tools/http/RequestExecutor.java
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);
}