Bug 5136 - org.apache.jmeter.protocol.http.sampler.HTTPSampler not redirecting properly.
Summary: org.apache.jmeter.protocol.http.sampler.HTTPSampler not redirecting properly.
Status: CLOSED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 1.5
Hardware: PC All
: P3 major with 1 vote (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-27 10:09 UTC by Kris Young
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kris Young 2001-11-27 10:09:02 UTC
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.
Comment 1 Mike Stover 2002-02-16 03:58:30 UTC
Implemented a fix very close to what is suggested here.
Comment 2 Jordi Salvat i Alabart 2002-12-27 16:17:01 UTC
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.
Comment 3 Jordi Salvat i Alabart 2002-12-29 14:22:11 UTC
Bulk-closing all bugs RESOLVED before JMeter 1.8 release date.
Comment 4 The ASF infrastructure team 2022-09-24 20:37:26 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/788