jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Using Proxy v. Auth Manager in JMeter
Date Fri, 06 Sep 2002 05:43:09 GMT
Hi All,

can anyone tell me the difference between using Proxy setting at start up 
and using the authManager in a test plan. I have an issue where if I use a 
simple piece of code see below to access  a web page it works, but through 
JMeter (which I know uses the classes) to open the same URL 
nothing happens. 



URL url = new URL(urlName);
                        HttpURLConnection uc = 

                        // the following line makes URLConnection look 
like MSIE
                      uc.setRequestProperty("User-Agent", "Mozilla/4.0 
(compatible; MSIE 5.01; Windows NT)");

                        // the following three lines calculate a 
BASE64-encoded username/password for the proxy

                        String userName = "";  // put your proxy/internet 
username here
                        String passWord = "";  // put your proxy/internet 
password here
                      String auth = "Basic " + new 
sun.misc.BASE64Encoder().encode((userName + ":" + passWord).getBytes());

                        // comment out the following three lines to switch 
off proxy access
                      uc.setRequestProperty("Proxy-Authorization", auth);
                      System.setProperty("http.proxyPort", "XXX"); 
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message