apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
7.95k stars 2.02k forks source link

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

Closed asfimport closed 21 years ago

asfimport commented 22 years ago

Kris Young (Bug 5136): 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.

Votes in Bugzilla: 1 Severity: major OS: All

asfimport commented 22 years ago

Mike Stover (migrated from Bugzilla): Implemented a fix very close to what is suggested here.

asfimport commented 21 years ago

Jordi Salvat i Alabart (migrated from Bugzilla): Marking all bugs RESOLVED before JMeter 1.8's release date as VERIFIED. Yes, it's pretty poor QA procedure, but there's bugs here lingering since JMeter 1.6, and we need to clean up a little.

asfimport commented 21 years ago

Jordi Salvat i Alabart (migrated from Bugzilla): Bulk-closing all bugs RESOLVED before JMeter 1.8 release date.