Hello sebb, This commit and the previous one seem strange to me. Are you sure you're not breaking something ?
Regards Philippe On Fri, Aug 24, 2012 at 3:21 PM, <[email protected]> wrote: > Author: sebb > Date: Fri Aug 24 13:21:08 2012 > New Revision: 1376905 > > URL: http://svn.apache.org/viewvc?rev=1376905&view=rev > Log: > The the case of getSendParameterValuesAsPostBody, encoding should be left > to the entity handler > > Modified: > > jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java > > Modified: > jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java > URL: > http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1376905&r1=1376904&r2=1376905&view=diff > > ============================================================================== > --- > jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java > (original) > +++ > jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java > Fri Aug 24 13:21:08 2012 > @@ -914,19 +914,13 @@ public class HTTPHC4Impl extends HTTPHCA > PropertyIterator args = getArguments().iterator(); > while (args.hasNext()) { > HTTPArgument arg = (HTTPArgument) > args.next().getObjectValue(); > - String value; > - if (haveContentEncoding){ > - value = arg.getEncodedValue(contentEncoding); > - } else { > - value = arg.getEncodedValue(); > - } > - postBody.append(value); > + postBody.append(arg.getValue()); > } > - ContentType contentType = > - > > ContentType.create(post.getFirstHeader(HTTPConstants.HEADER_CONTENT_TYPE).getValue(), > contentEncoding); > - StringEntity requestEntity = new > StringEntity(postBody.toString(), contentType); > + final String charset = getContentEncoding( > HTTP.DEF_CONTENT_CHARSET.name()); > + // Let StringEntity perform the encoding > + StringEntity requestEntity = new > StringEntity(postBody.toString(), charset); > post.setEntity(requestEntity); > - postedBody.append(postBody.toString()); // TODO OK? > + postedBody.append(postBody.toString()); > } else { > // It is a normal post request, with parameter names > and values > > > > -- Cordialement. Philippe Mouawad.
