You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2012/11/18 07:55:20 UTC
[Bug 54161] New: Proxy : create binary sampler for
x-www-form-urlencoded
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: issues@jmeter.apache.org
Reporter: etienne.carriere@gmail.com
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.
[Bug 54161] Proxy : be able to create binary sampler for
x-www-form-urlencoded POST request
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54161
Etienne Carrière <et...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Proxy : create binary |Proxy : be able to create
|sampler for |binary sampler for
|x-www-form-urlencoded |x-www-form-urlencoded POST
| |request
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54161] Proxy : be able to create binary sampler for
x-www-form-urlencoded POST request
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54161
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |p.mouawad@ubik-ingenierie.c
| |om
Hardware|PC |All
Severity|normal |enhancement
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54161] Proxy : be able to create binary sampler for
x-www-form-urlencoded POST request
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54161
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Applied with a change, test on binaryContent is done only if contentType !=
null.
Note you will have to change property:
- proxy.binary.types
to add application/x-www-form-urlencoded in your particular case.
Date: Sun Nov 18 10:06:44 2012
New Revision: 1410860
URL: http://svn.apache.org/viewvc?rev=1410860&view=rev
Log:
Bug 54161 - Proxy : be able to create binary sampler for x-www-form-urlencoded
POST request
Bugzilla Id: 54161
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
jmeter/trunk/xdocs/changes.xml
--
You are receiving this mail because:
You are the assignee for the bug.