jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1404638 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Date Thu, 01 Nov 2012 15:19:22 GMT
Author: sebb
Date: Thu Nov  1 15:19:22 2012
New Revision: 1404638

URL: http://svn.apache.org/viewvc?rev=1404638&view=rev
Log:
Proxy option to set user and password at startup (-u and -a) not working with HTTPClient 4
Align code with HC3 implementation: use NTCredentials throughout the HC4 implementation
Bugzilla Id: 54057

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1404638&r1=1404637&r2=1404638&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Thu Nov  1 15:19:22 2012
@@ -50,7 +50,6 @@ import org.apache.http.NameValuePair;
 import org.apache.http.StatusLine;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.NTCredentials;
-import org.apache.http.auth.UsernamePasswordCredentials;
 import org.apache.http.client.CredentialsProvider;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.HttpRequestRetryHandler;
@@ -506,7 +505,7 @@ public class HTTPHC4Impl extends HTTPHCA
                 if (proxyUser.length() > 0) {
                     ((AbstractHttpClient) httpClient).getCredentialsProvider().setCredentials(
                             new AuthScope(proxyHost, proxyPort),
-                            new UsernamePasswordCredentials(proxyUser, getProxyPass()));
+                            new NTCredentials(proxyUser, getProxyPass(), localHost, PROXY_DOMAIN));
                 }
             } else if (useStaticProxy) {
                 HttpHost proxy = new HttpHost(PROXY_HOST, PROXY_PORT);
@@ -514,7 +513,7 @@ public class HTTPHC4Impl extends HTTPHCA
                 if (PROXY_USER.length() > 0) {
                     ((AbstractHttpClient) httpClient).getCredentialsProvider().setCredentials(
                             new AuthScope(PROXY_HOST, PROXY_PORT),
-                            new UsernamePasswordCredentials(PROXY_USER, PROXY_PASS));
+                            new NTCredentials(PROXY_USER, PROXY_PASS, localHost, PROXY_DOMAIN));
                 }
             }
 



Mime
View raw message