Summary: | HTTP Post Request fails due to triple backslash in Body Data | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | utostan |
Component: | HTTP | Assignee: | JMeter issues mailing list <issues> |
Status: | NEW --- | ||
Severity: | major | CC: | avam0nst3r |
Priority: | P2 | ||
Version: | 5.3 | ||
Target Milestone: | JMETER_5.3.0 | ||
Hardware: | PC | ||
OS: | All | ||
Attachments: | incorrect multiple-backslash processing in request body |
Description
utostan
2019-03-11 21:12:25 UTC
Do you mind providing a simple .jmx file or Results Tree script so I can replicate this myself? I feel I can help fix this if I'm able to replicate what you are experiencing. Having trouble understanding based on your post alone Created attachment 37249 [details]
incorrect multiple-backslash processing in request body
simple JMX, proving that POST request body is being sent "as is", until you add any ${var}. Then it start "fixing" the double-backslashes, and m.b. other chars too.
simple jmx attached, just check what it actually tries to send in tree view for both requests The post request body {"field","value\\value"} is sent exactly as {"field","value\\value"} While {"field${__threadNum}","value\\value"} is sent as {"field1","value\value"} Jmeter 5.3 still has this problem Same issue here. Apparently, the problematic code is within `FunctionParser.compileString(String value)` method. As stated in javadoc: "Removes escapes from '$', ',' and '\'." This is why it's working perfectly fine when no variable is used. Pull request to fix the issue: https://github.com/apache/jmeter/pull/616 I'm not sure of the overall impact of this modification. It now allows multiple '\' without removing any of them, as long as it's not in front of a `$` or a `,`. This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5035 |