You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2012/12/07 16:09:36 UTC

svn commit: r1418351 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java xdocs/changes.xml

Author: pmouawad
Date: Fri Dec  7 15:09:35 2012
New Revision: 1418351

URL: http://svn.apache.org/viewvc?rev=1418351&view=rev
Log:
Bug 54258 - Proxy : Use Raw Post Body when Sampler has one unnamed argument, useful for Samplers using POST method by of type JSON, XML, GWT body
Bugzilla Id: 54258

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java?rev=1418351&r1=1418350&r2=1418351&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java Fri Dec  7 15:09:35 2012
@@ -31,6 +31,7 @@ import javax.xml.parsers.SAXParserFactor
 
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.jmeter.config.Arguments;
 import org.apache.jmeter.protocol.http.config.MultipartUrlConfig;
 import org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui;
 import org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase;
@@ -103,6 +104,10 @@ public class DefaultSamplerCreator exten
         if (log.isDebugEnabled()) {
             log.debug("sampler path = " + sampler.getPath());
         }
+        Arguments arguments = sampler.getArguments();
+        if(arguments.getArgumentCount() == 1 && arguments.getArgument(0).getName().length()==0) {
+            sampler.setPostBodyRaw(true);
+        }
     }
 
     /**

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1418351&r1=1418350&r2=1418351&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Fri Dec  7 15:09:35 2012
@@ -215,6 +215,7 @@ to the elements View Results Tree, Asser
 <li><bugzilla>54155</bugzilla> - ModuleController : Add a shortcut button to unfold the tree up to referenced controller and highlight it</li>
 <li><bugzilla>54251</bugzilla> - Add tristate checkbox implementation</li>
 <li><bugzilla>54257</bugzilla> - Enhance SamplerCreator interface to meet new requirements</li>
+<li><bugzilla>54258</bugzilla> - Proxy : Use Raw Post Body when Sampler has one unnamed argument, useful for Samplers using POST method by of type JSON, XML, GWT body</li>
 </ul>
 
 <h2>Non-functional changes</h2>