https://bz.apache.org/bugzilla/show_bug.cgi?id=65466
Bug ID: 65466
Summary: content-type application/json default encoding
Product: Tomcat 9
Version: 9.0.50
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: -----
when making a request with Content-Type:"application/json" (without encoding
parameter!) against tomcat (i reproduced it with postman), tomcat changes the
request to:
Content-Type:"application/json;charset=ISO-8859-1"
(in case of tomcat 9, i tried 9.0.50 and 9.0.48, tomcat 10 adding UTF-8
instead).
This is very strange to me, i think headers should not be modified at all.
And according to rfc, json default is UTF-8:
https://datatracker.ietf.org/doc/html/rfc7159
I could fix this by setting the charset of every request explicitly to UTF-8,
but if you have clients relying on the standard, it should not be necessary.
expected behavior:
- use the correct default, either the tomcat 10 way or leaving the header
unchanged.
- if not possible (e.g. backward compatibility?) add longer explanation to
migration guide if you have clients without json payload without charset that
they will break.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]