You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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".
lpetr (Bug 60579):
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)
Created attachment content-type_issue.jmx: Test plan used to reproduce the issue
content-type_issue.jmx
Severity: normal
OS: Linux
Duplicated by:
The text was updated successfully, but these errors were encountered: