You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2006/09/11 10:12:11 UTC

DO NOT REPLY [Bug 40459] New: - HttpClient Sampler does not use proxy settings

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40459>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40459

           Summary: HttpClient Sampler does not use proxy settings
           Product: JMeter
           Version: 2.1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: HTTP
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: e0125151@student.tuwien.ac.at


When using HttpClient Sampler JMeter ignores the -H and -P command line proxy 
settings and tries to send requests directly. 
I changed the code of the method setupConnection in 
org.apache.jmeter.protocol.http.sampler.HTTPSampler2 so the problem does not 
block me, but I am not sure if it is clean.

HttpClient setupConnection(URL u, HttpMethodBase httpMethod, HTTPSampleResult 
res) throws IOException {
...
 if (PROXY_HOST.length() > 0 && !isNonProxy(host)) {
            if (log.isDebugEnabled()){
                log.debug("Setting proxy: "+PROXY_HOST+":"+PROXY_PORT);
            }
            hc.setProxy(PROXY_HOST, PROXY_PORT);
  /*ADDED*/ httpClient.setHostConfiguration(hc);
            if (PROXY_USER.length() > 0){
                httpClient.getState().setProxyCredentials(
                    new 
AuthScope(PROXY_HOST,PROXY_PORT,null,AuthScope.ANY_SCHEME),
                    // NT Includes other types of Credentials
                    new NTCredentials(
                            PROXY_USER,
                            PROXY_PASS,
                            null, // "thishost",
                            "" // domain
                ));
            }
        }
...
}
Elena.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 40459] - HttpClient Sampler does not use proxy settings

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40459>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40459


sebb@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From sebb@apache.org  2006-09-11 10:50 -------
Thanks - this was noticed by others, and has been fixed in the current nightly 
using much the same fix.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org