Bug 62584 - Removing '/./' in redirected URLs (Wicket-Feature)
Summary: Removing '/./' in redirected URLs (Wicket-Feature)
Status: NEEDINFO
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 4.0
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-30 19:24 UTC by peter
Modified: 2018-10-27 14:14 UTC (History)
2 users (show)



Attachments
Patch (1.46 KB, patch)
2018-07-31 20:59 UTC, peter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description peter 2018-07-30 19:24:59 UTC
In addition to Bug 49083 does Wicket not only produce collapsing URLs like

"app/path/../path2/" 

but also relative paths like

"app/wicket/./login?0"

in redirected URLs.

Current Browsers fix URLs with "/./" by removing "/./" but not JMeter.

In this Bug the problem with relative paths shall be fixed by replacing "/./" by "/" in the URLs getting by redirection.
Comment 1 peter 2018-07-31 20:59:50 UTC
Created attachment 36063 [details]
Patch

Patch for this Bug
Comment 2 Felix Schumacher 2018-08-09 09:52:45 UTC
If you look at ConversionUtils#removeSlashDotDot, you will see, that it does a lot more than simply removing '/..' from the complete URL.

Maybe it would be a good idea to factor out the common logic of /.. and /. into a new method and delegate the old one and the new one (you would have to create, too) to it.

And by the way. String#replaceAll takes a regex as first command and '.' has a special meaning in regex, so it is probably a good idea to add test cases for the change :) It should be easier, if you take the route via ConversionUtils.
Comment 3 The ASF infrastructure team 2022-09-24 20:38:14 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4832