woolfel 2005/05/28 08:01:26
Modified: src/protocol/http/org/apache/jmeter/protocol/http/sampler
WebServiceSampler.java
Log:
change the auth so that it is the same as Httpsampler. if the auth is null
and the
URL is null, the sampler will not set the username/password. if the auth is
not null, but
the auth URL is null, a warning will be logged.
peter
Revision Changes Path
1.27 +11 -6
jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java
Index: WebServiceSampler.java
===================================================================
RCS file:
/home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/sampler/WebServiceSampler.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- WebServiceSampler.java 27 May 2005 01:11:36 -0000 1.26
+++ WebServiceSampler.java 28 May 2005 15:01:26 -0000 1.27
@@ -475,10 +475,15 @@
// set the auth. thanks to KiYun Roe for contributing the patch
// I cleaned up the patch slightly. 5-26-05
if (getAuthManager() != null) {
- AuthManager authmanager = getAuthManager();
- Authorization auth = authmanager.getAuthForURL(getUrl());
- spconn.setUserName(auth.getUser());
- spconn.setPassword(auth.getPass());
+ if (getAuthManager().getAuthForURL(getUrl()) != null){
+ AuthManager authmanager = getAuthManager();
+ Authorization auth = authmanager.getAuthForURL(getUrl());
+ spconn.setUserName(auth.getUser());
+ spconn.setPassword(auth.getPass());
+ } else {
+ log.warn("the URL for the auth was null." +
+ " Username and password not set");
+ }
}
// check the proxy
String phost = "";
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]