Hello, We upgraded recently JMeter in a branch from HttpClient 4.2.6 to 4.5 and are facing what seems to be a regression.
It seems that when we don't set a charset in StringBody , MultipartEntity, FormBodyPart, no charset is written in ContentType generation while it was the case at least in 4.2.6, I think issue was introduced in 4.3. Note also that javadocs of these components say: @param charset the character set to use, may be {@code null}, in which case {@link MIME#DEFAULT_CHARSET} - i.e. US-ASCII - is used. But it's not the case since 4.3 Reading the sepcs, I am not sure that when charset is US-ASCII , it should be written but it was the case in 4.2.6. I created https://issues.apache.org/jira/browse/HTTPCLIENT-1665 As a test case, you can have a look at JMeter test cases: org.apache.jmeter.protocol.http.sampler.TestHTTPSamplersAgainstHttpMirrorServer#testPostRequest_FormMultipart3 org.apache.jmeter.protocol.http.sampler.TestHTTPSamplersAgainstHttpMirrorServer#testPostRequest_FileUpload3 The issue appears when no contentEncoding is set. Thanks for help. Regards Philippe M.