Bug 56231 - Move redirect location processing from HC3/HC4 samplers to HTTPSamplerBase#followRedirects()
Summary: Move redirect location processing from HC3/HC4 samplers to HTTPSamplerBase#fo...
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.11
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2014-03-07 11:46 UTC by Sebb
Modified: 2014-03-17 00:51 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2014-03-07 11:46:59 UTC
Redirect location processing should all be handled in the shared method HTTPSamplerBase#followRedirects(), rather than in individual samplers.

The location processing code thus needs to be removed from the HC3 and HC4 samplers, which should just store the location header for subsequent processing by the method HTTPSamplerBase#followRedirects() (as is done by the Java and Soap samplers).

Since it was found necessary to add location fixups to the HC3/HC4 samplers, this must mean that the existing processing in the followRedirects() method was incomplete. The next stage is to document the bug ids that drove changes to HC3/HC4 and see how to integrate fixes for these in followRedirects().

To be continued.
Comment 1 Sebb 2014-03-07 18:12:35 UTC
Related fixed bugs:

Bug 54482 - HC fails to follow redirects with non-encoded chars

Bug 55717 - Bad handling of Redirect when URLs are in relative format by HttpClient4 and HttpClient31

Related unfixed bugs:
Bug 56207 - URLs get encoded on redirects in HC3.1 & HC4 samplers
Comment 2 Sebb 2014-03-12 00:09:03 UTC
The Location header value seems to be unencoded, so needs to be encoded before use by samplers.

This is quite easy using the java.net.URI class.

Unfortunately HC3.1 does its own parsing, and this is too strict: e.g. it does not allow [] in query strings. As HC3.1 has been EOL for some while now there seems little point in applying a special fix for it.
Comment 3 Sebb 2014-03-17 00:51:04 UTC
URL: http://svn.apache.org/r1578188
Move redirect location processing from HC3/HC4 samplers to HTTPSamplerBase#followRedirects()
Bugzilla Id: 56231

Comment 4 The ASF infrastructure team 2022-09-24 20:37:56 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3339