-
Notifications
You must be signed in to change notification settings - Fork 41.2k
JSON Mime Type is missing #4161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think the reason why spring-boot don't have json mime type is we are following the same mine type mappings as tomcat |
Ok, this is an acceptable reason IMO. You can close this issue if the reference code is the Tomcat java version. |
It's interesting that Tomcat has different defaults in Java code and in web.xml. I'd like to understand that difference and figure out which it makes most sense for us to align with. |
From a conversation with @markt-asf:
On the reason for the difference between the two lists of mappings:
Some advice on a definitive source for mime mappings:
|
The different embedded containers have different mime mapping configurations. Both Jetty and Undertow have default mime mappings that Boot's mime mappings are then added to, whereas Tomcat just uses Boot's mime mappings. One consequence of this is that both Jetty and Undertow have a mapping for JSON while Tomcat does not. |
Seems sensible to add it (unless you object @wilkinsona) |
Hi,
MimeMappings does not contain the standard JSON declaration. When my application serves my file.json, no HTTP Content-Type headers are sent. Firefox reads the file but generates a warning "not well formed".
Here is my current workaround:
The text was updated successfully, but these errors were encountered: