Could JMeter support binary post data for following two cases 1. when using vars.putObject function to set arrary object data. 2. when using "Content-Encoding: gzip" in post request header the request body data could be compressed
(In reply to Liu XP from comment #0) > Could JMeter support binary post data for following two cases > 1. when using vars.putObject function to set array object data. I am not sure to understand, can you clarify what is currently not possible ? > 2. when using "Content-Encoding: gzip" in post request header the request > body data could be compressed This duplicates Bug 58609
For example: The implementation source code of HTTP Client 4 in current master branch jmeter\src\protocol\http\org\apache\jmeter\protocol\http\sampler\HTTPHC4Impl.java The line 1587 below shows that all the post data will be converted to StringEntity first. Thus, the original post data format couldn't be used, such as ProtoBuff Msg. StringEntity requestEntity = new StringEntity(postBody.toString(), contentEncoding); For question 1: I hope JMeter could support original post data format when the request included special content-type. Because there is no judging condition about request content-encoding, all request will not be compressed. For question 2: I think following entity could be used to support gzipCompress. HttpEntity entity = EntityBuilder.create().setText(postBody.toString()).gzipCompress().setContentEncoding(contentEncoding).build();
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5112