jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <philippe.moua...@gmail.com>
Subject Re: svn commit: r1806215 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java xdocs/changes.xml
Date Sat, 26 Aug 2017 13:11:19 GMT
Hi Felix,
Are we sure that when encoding is UTF-8 there is no need to set charset ?

AFAIK, there were already issue with Multipart forms even before
refactoring.

Thanks
Thanks

On Fri, Aug 25, 2017 at 9:02 PM, <fschumacher@apache.org> wrote:

> Author: fschumacher
> Date: Fri Aug 25 19:02:36 2017
> New Revision: 1806215
>
> URL: http://svn.apache.org/viewvc?rev=1806215&view=rev
> Log:
> Don't set the charset on enclosing multipart/form-data header. It
> irritates some servers.
>
> The charset was added sometime back while refactoring to use a newer api
> of http client.
> See https://bz.apache.org/bugzilla/show_bug.cgi?id=56141 for more info.
>
> Bugzilla Id: 61384
>
>
> Modified:
>     jmeter/trunk/src/protocol/http/org/apache/jmeter/
> protocol/http/sampler/HTTPHC4Impl.java
>     jmeter/trunk/xdocs/changes.xml
>
> 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=1806215&
> r1=1806214&r2=1806215&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 25 19:02:36 2017
> @@ -1242,7 +1242,7 @@ public class HTTPHC4Impl extends HTTPHCA
>          if(getUseMultipartForPost()) {
>              // If a content encoding is specified, we use that as the
>              // encoding of any parameter values
> -            Charset charset = null;
> +            Charset charset;
>              if(haveContentEncoding) {
>                  charset = Charset.forName(contentEncoding);
>              } else {
> @@ -1254,8 +1254,7 @@ public class HTTPHC4Impl extends HTTPHCA
>                          getDoBrowserCompatibleMultipart(), charset,
> haveContentEncoding);
>              }
>              // Write the request to our own stream
> -            MultipartEntityBuilder multipartEntityBuilder =
> MultipartEntityBuilder.create()
> -                    .setCharset(charset);
> +            MultipartEntityBuilder multipartEntityBuilder =
> MultipartEntityBuilder.create();
>              if(getDoBrowserCompatibleMultipart()) {
>                  multipartEntityBuilder.setLaxMode();
>              } else {
>
> Modified: jmeter/trunk/xdocs/changes.xml
> URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.
> xml?rev=1806215&r1=1806214&r2=1806215&view=diff
> ============================================================
> ==================
> --- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
> +++ jmeter/trunk/xdocs/changes.xml [utf-8] Fri Aug 25 19:02:36 2017
> @@ -167,6 +167,9 @@ Incorporated feed back about unclear doc
>
>  <h3>HTTP Samplers and Test Script Recorder</h3>
>  <ul>
> +  <li><bug>61384</bug>Don't set the charset on enclosing
> <code>multipart/form-data</code> header. It irritates some servers.<br/>
> +     The charset was added sometime back while refactoring to use a newer
> api of http client.
> +     See <bug>56141</bug> for more info.</li>
>  </ul>
>
>  <h3>Other Samplers</h3>
>
>
>


-- 
Cordialement.
Philippe Mouawad.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message