https://bz.apache.org/bugzilla/show_bug.cgi?id=60579
Bug ID: 60579
Summary: Since JMeter 3.1 HTTP request sampler adds unnecessary
Content-Type header into GET requests without body
Product: JMeter
Version: 3.1
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: HTTP
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 34615
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34615&action=edit
Test plan used to reproduce the issue
Hello,
I found since JMeter 3.1 "HTTP request" sampler adds unnecessary "Content-Type:
text/plain; charset=ISO-8859-1" header into GET requests with no data in body.
RFC2616 section 7.2.1 says:
"Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type
header field defining the media type of that body. If and only if the media
type is not given by a Content-Type field, the recipient MAY attempt to guess
the media type via inspection of its content and/or the name extension(s) of
the URI used to identify the resource. If the media type remains unknown, the
recipient SHOULD treat it as type "application/octet-stream"."
If my understanding is correct, the header should not be present for simple GET
requests without "entity-body".
JMeter 3.1 behavior:
GET http://www.google.com/
GET data:
[no cookies]
Request Headers:
Connection: keep-alive
Content-Length: 0
Content-Type: text/plain; charset=ISO-8859-1
Host: www.google.com
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_111)
JMeter 3.0 behavior (correct/expected):
GET http://www.google.com/
GET data:
[no cookies]
Request Headers:
Connection: keep-alive
Content-Length: 0
Host: www.google.com
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_111)
--
You are receiving this mail because:
You are the assignee for the bug.