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
{{ message }}
Repository navigation
MediaTypeFactory should come with its own complete mime.types file [SPR-14908] #19474
A couple of improvements to MediaTypeFactory, in order to improve the experience of serving Resource instances from web apps:
Copy (or move) the mime.types file from context-support to the factory module. context-support is not necessarily included on the classpath, and is quite vital since the default mime types file provided by JAF is not satisfactory (see below)
Add additional file types to the mime.types file. It has does not reflect current web media types (such as woff, woff2, ico)
Optionally:
-Rename it to MimeTypeFactory and move it to the core module, next to MimeType (or possibly merge it into MimeType). Determining the mime type of a file is not necessarily only a concern for web apps.-
Drop the Java Activation dependency, as we don't really need it: the mimetypes.default file provided in the JDK brings us even less than our own mime.types, and in JDK 9 we cannot assume that JAF is always present.
Having mime.types for use with spring-web is quite critical with the reactive support where we cannot fall back on ServletContext media type lookups. As it is right now serving css files does not work out of the box (see #19566).
Activity
spring-projects-issues commentedon Nov 15, 2016
Arjen Poutsma commented
A more up-to-date mime.types file can be found in Apache HTTPD : http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/conf/mime.types?revision=1752884&view=co
spring-projects-issues commentedon Dec 9, 2016
Rossen Stoyanchev commented
Having
mime.typesfor use with spring-web is quite critical with the reactive support where we cannot fall back on ServletContext media type lookups. As it is right now serving css files does not work out of the box (see #19566).spring-projects-issues commentedon Mar 14, 2017
Arjen Poutsma commented
PR at #1356
spring-projects-issues commentedon Mar 21, 2017
Rossen Stoyanchev commented
PR processed with some follow-up comments.
spring-projects-issues commentedon Mar 23, 2017
Arjen Poutsma commented
Further commits related to this issue in fd1db57 and a287e67