HttpCLient4 adds default header that can not be easly removed. (Java does not)
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
**szuther** ([Bug 64010](https://bz.apache.org/bugzilla//show_bug.cgi?id=64010&redirect=false)):
httpClient4 adds
"Content-Type: application/x-www-form-urlencoded; charset=UTF-8"
(and other Header, see attached pics) for POST requests even if i don’t have specified any Header for that request,
Content-Type is unnecessary for a post without a Body.
The Server don’t except "application/x-www-form-urlencoded" as Content-Type and the Request will fail.
The Server would accept a request without Content-Type header.
The Java implementation does that not.
Its not good to have these completely different behaviour and there is no (easy?) way to send a POST request without the Content-Type Header with httpClient4.
In the attachment is the simple POST test without defined header and images of the sent request headers with java and httpclient4 implementation
Created attachment [Content-Type added.zip](https://apache.github.io/jmeter-bugzilla-attachments/10/64010/36919/Content-Type%20added.zip): Test + pics
Severity: normal
OS:
Contributor guide
Assessment
This issue has not been assessed yet.