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 2001/11/27 19:09:03 UTC

DO NOT REPLY [Bug 5136] New: - org.apache.jmeter.protocol.http.sampler.HTTPSampler not redirecting properly.

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5136

org.apache.jmeter.protocol.http.sampler.HTTPSampler not redirecting properly.

           Summary: org.apache.jmeter.protocol.http.sampler.HTTPSampler not
                    redirecting properly.
           Product: JMeter
           Version: 1.5
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Main
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: young1234567890@yahoo.com


This is really version 1.7Beta.

The redirectUrl(HttpURLConnection, URL, UrlConfig) method is not redirecting 
properly.

When performing a GET with params, the params are appended to the redirected 
location URL.

i.e. If we have:
http://my.server.com/servlet/Login?username=user&password=psswd

The login servlet redirects to:
http://my.server.com/servlet/Welcome?name=YourName

In the JMeter framework the login servlet redirects to:
http://my.server.com/servlet/Welcome?name=YourName?username=user&password=psswd

In my local copy of 'HTTPSampler' I added at line #383:
      URL newUrl = new URL(loc);
 ---> urlConfig.removeArguments();
      urlConfig.putProperty(UrlConfig.DOMAIN, newUrl.getHost());
      urlConfig.putProperty(UrlConfig.PATH, newUrl.getFile());

This did fix the problem but I'm not sure where else this is needed.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>