Bug 58923

Summary: Retrieve all embedded resources doesn't honor dot segments
Product: JMeter Reporter: Jan Eerdekens <jan.eerdekens>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.13   
Target Milestone: ---   
Hardware: Macintosh   
OS: other   
Attachments: normalize embedded uris before download

Description Jan Eerdekens 2016-01-26 19:40:31 UTC
When an embedded resource has a URL that contains a dot segment like '/../' this causes an HTTP 404 because the URL isn't normalized before retrieving it.

If I take such a URL and try to do a HTTP GET using Commons HttpComponents I see the same behavior unless I create a URI beforehand and first call normalize() on that and pass the result to the HTTP GET. It seems these HTTP libraries assume that this is done and so it seems that JMeter should incorporate this for the retrieve embedded resources functionality.
Comment 1 Felix Schumacher 2016-01-26 20:00:18 UTC
Created attachment 33493 [details]
normalize embedded uris before download

Try to normalize URIs before downloading them as part of the embedded resource downloads.
Comment 2 Felix Schumacher 2016-01-26 20:50:03 UTC
Date: Tue Jan 26 20:49:07 2016
New Revision: 1726900

URL: http://svn.apache.org/viewvc?rev=1726900&view=rev
Log:
Normalize URIs when downloading embedded resources.

Bugzilla Id: 58923

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
    jmeter/trunk/xdocs/changes.xml