You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by "ThorbenKonopka (via GitHub)" <gi...@apache.org> on 2026/07/27 09:53:35 UTC
[I] Bug Report: JMeter Adds Invalid "charset" Parameter to multipart/form-data Content-Type Header [jmeter]
ThorbenKonopka opened a new issue, #6741:
URL: https://github.com/apache/jmeter/issues/6741
### Expected behavior
According to RFC 7578 section 8:
The `multipart/form-data` media type has no required parameters other than `boundary` and no optional parameters. However, jmeter adds a `charset` parameter to the `Content-Type` header when sending `multipart/form-data` requests.
The `Content-Type` header should only contain the `boundary` parameter:
`Content-Type: multipart/form-data; boundary=6WHBdCwuCrCqKt-bDCQyRLPETfeXcy-5twdnz`
### Actual behavior
The `Content-Type` header includes an invalid `charset` parameter:
`Content-Type: multipart/form-data; boundary=6WHBdCwuCrCqKt-bDCQyRLPETfeXcy-5twdnz; charset=UTF-8`
### Steps to reproduce the problem
1. Create an HTTP-Request Sampler
2. Set the method to POST
3. Add a file
4. Check the `Use multipart/form-data` box
5. Run the request and inspect the headers of that request
### JMeter Version
5.6.3
### Java Version
_No response_
### OS Version
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Bug Report: JMeter Adds Invalid "charset" Parameter to multipart/form-data Content-Type Header [jmeter]
Posted by "milamberspace (via GitHub)" <gi...@apache.org>.
milamberspace closed issue #6741: Bug Report: JMeter Adds Invalid "charset" Parameter to multipart/form-data Content-Type Header
URL: https://github.com/apache/jmeter/issues/6741
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Bug Report: JMeter Adds Invalid "charset" Parameter to multipart/form-data Content-Type Header [jmeter]
Posted by "milamberspace (via GitHub)" <gi...@apache.org>.
milamberspace commented on issue #6741:
URL: https://github.com/apache/jmeter/issues/6741#issuecomment-5114019451
Thanks for the report, @ThorbenKonopka.
This is a duplicate of #6250, and the good news is that it has already been fixed.
JMeter used to call `setCharset(...)` on the multipart entity builder, and the underlying HttpClient builder appended that charset to the top-level `Content-Type` (`; charset=UTF-8`), which violates RFC 7578 §8. The vendored builder no longer adds it — only the `boundary` parameter is kept:
- Commit 64e4fcca20b — *"Avoid adding "; charset=" for multipart/form-data requests"*
You are testing on 5.6.3, which predates the fix, so you still see the `charset` parameter. The change is already in `master` and will ship in the next release. If you'd like to verify sooner, you can try a [nightly build](https://ci-builds.apache.org/job/JMeter/job/JMeter-nightly/).
Closing as a duplicate of #6250.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org