Bug 58923 - Retrieve all embedded resources doesn't honor dot segments
Summary: Retrieve all embedded resources doesn't honor dot segments
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: Macintosh other
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-26 19:40 UTC by Jan Eerdekens
Modified: 2016-01-26 20:50 UTC (History)
0 users



Attachments
normalize embedded uris before download (1.71 KB, patch)
2016-01-26 20:00 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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