Bug 64010

Summary: HttpCLient4 adds default header that can not be easly removed. (Java does not)
Product: JMeter Reporter: szuther
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 5.2.1   
Target Milestone: JMETER_5.2   
Hardware: PC   
OS:    
Attachments: Test + pics

Description szuther 2019-12-17 11:22:22 UTC
Created attachment 36919 [details]
Test + pics

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