-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: taskA general taskA general task
Milestone
Description
Arjen Poutsma opened SPR-14908 and commented
A couple of improvements to MediaTypeFactory, in order to improve the experience of serving Resource instances from web apps:
- Copy (or move) the
mime.typesfile 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.typesfile. It has does not reflect current web media types (such aswoff,woff2,ico)
Optionally:
- -Rename it to
MimeTypeFactoryand move it to the core module, next toMimeType(or possibly merge it intoMimeType). 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.defaultfile provided in the JDK brings us even less than our ownmime.types, and in JDK 9 we cannot assume that JAF is always present.
Issue Links:
- Resource.isFile() and JAF MediaTypeFactory [SPR-14484] #19053 Resource.isFile() and JAF MediaTypeFactory
- Deprecate unused web-specific MimeTypeUtils constants [SPR-15137] #19703 Deprecate unused web-specific MimeTypeUtils constants
- Automatically set the right content type in BodyInserters#fromResource() [SPR-14905] #19471 Automatically set the right content type in BodyInserters#fromResource()
- Bad Content-Type for static resources in Spring Web Reactive [SPR-14999] #19566 Bad Content-Type for static resources in Spring Web Reactive ("supersedes")
1 votes, 6 watchers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: taskA general taskA general task