https://issues.apache.org/bugzilla/show_bug.cgi?id=54161
Bug ID: 54161
Summary: Proxy : create binary sampler for
x-www-form-urlencoded
Product: JMeter
Version: 2.8
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: HTTP
Assignee: [email protected]
Reporter: [email protected]
Classification: Unclassified
Hi,
Here is my bug/patch proposal :
- Context : I have an application which do not respect the rules for
x-www-form-urlencoded MIME-type. This application puts binary data in
x-www-form-urlencoded POST data .
- Goal : I would like to force Jmeter to use binary Sampler type for those
request.
- Current code : it is impossible as there is a specific case for
x-www-form-urlencoded MIME-type
- Proposal :
Index:
src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
===================================================================
---
src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
(revision 1410831)
+++
src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
(working copy)
@@ -172,7 +172,7 @@
// used when postData is pure xml (eg. an xml-rpc call) or for PUT
} else if (postData.trim().startsWith("<?") ||
HTTPConstants.PUT.equals(sampler.getMethod())) {
sampler.addNonEncodedArgument("", postData, "");
- } else if (contentType == null ||
contentType.startsWith(HTTPConstants.APPLICATION_X_WWW_FORM_URLENCODED) ){
+ } else if ((contentType == null ||
contentType.startsWith(HTTPConstants.APPLICATION_X_WWW_FORM_URLENCODED)) && (!
isBinaryContent(contentType)) ){
// It is the most common post request, with parameter name and
values
// We also assume this if no content type is present, to be
most backwards compatible,
// but maybe we should only parse arguments if the content
type is as expected
Best regards,
Etienne Carrière
--
You are receiving this mail because:
You are the assignee for the bug.