Bug 63343 - When path contains %3A, JMeter sends the decoded path ((":" instead of "%3A")
Summary: When path contains %3A, JMeter sends the decoded path ((":" instead of "%3A")
Status: NEEDINFO
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 5.1.1
Hardware: PC All
: P2 normal (vote)
Target Milestone: JMETER_5.1.1
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-12 15:58 UTC by Jerome
Modified: 2019-06-16 13:22 UTC (History)
1 user (show)



Attachments
ZIP with JMX, Recorded HAR from Web-Browser and Fiddler Screenshot (19.91 KB, application/zip)
2019-04-12 15:58 UTC, Jerome
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome 2019-04-12 15:58:49 UTC
Created attachment 36524 [details]
ZIP with JMX, Recorded HAR from Web-Browser and Fiddler Screenshot

-- ISSUE --

Hi

Seems like an issue with url encoding characters in path. We have an http request with the following path:
"/s/rco-us/this-little-trailblazer%3A-a-girl-power-primer/9781338281798-rco-us.html?cgid=C_6"

It happens only with HttpClient 4.5.x. When selecting "Java" http implementation, the request works fine. The server must absolutely receive the request as is (with ""%3A" in path, not ":").

-- ACTUAL RESULT --

When the http request path contains "%3A", it replaces "%3A" by ":" (url decoded  char). Our server fails to read the request in that case.

-- EXPECTED RESULT --

JMeter should send "%3A" within the path as is. It should not decode "%3A" to ":" before sending the request.

-- MORE INFO --

When replaying this request in JMeter, it fails (the server performs a redirect to the homepage). Chrome and Firefox work well:

- When capturing the request sent by JMeter using Fiddler, JMeter replaces the "%3A" by ":" in the request path,
- Browsers like Chrome or Firefox send the URL encoded request path (thus leaving "%3A" as is).

We're not expecting fiddler to url decode the request path before sending it. It should leave it as is (or url encode characters forbidden in urls).

As stated in RFC 3986, reserved characters should be url encoded using "Percent-Encoding":
https://en.wikipedia.org/wiki/Percent-encoding

-- STEPS TO REPRODUCE --

1. Open JMX,
2. Execute in JMeter with Fiddler as proxy,
3. Request in Fiddler shows JMeter sends http request path with ":" instead of "%3A",
4. Web browser send "%3A", not ":", when executing the same http request.
Comment 1 Jerome 2019-04-12 16:01:09 UTC
We're not expecting JMeter to url decode "%3A" into ":" before sending the http request. It should leave it as is (or url encode characters forbidden in urls).
Comment 2 Felix Schumacher 2019-04-17 16:34:52 UTC
Might be a duplicate of https://bz.apache.org/bugzilla/show_bug.cgi?id=63298
Comment 3 Philippe Mouawad 2019-06-16 13:22:12 UTC
@Jérome,
Can you test nightly build and confirm issue is fixed please ?
Thank you