Closed
Description
Tom Adam opened SPR-13658 and commented
getMediaType method in ResourceHttpRequestHandler does not take into account the media types registered by a WebMvcConfigurerAdapter instance's configureContentNegotiation method. The method only checks mime types registered in the servlet context of JAF. This way it is impossible to register special media types for static resources except for using web.xml.
Affects: 4.1.8
Issue Links:
- Content Type mapping falls back to text/html when serving static resources like yaml files [SPR-14326] #18898 Content Type mapping falls back to text/html when serving static resources like yaml files
- Regression: Static JS files served as 'application/octet-stream' instead of 'application/javascript' [SPR-14368] #18940 Regression: Static JS files served as 'application/octet-stream' instead of 'application/javascript'
- When favorPathExtension is false ResourceHttpRequestHandler serves resources with different content type in 4.3 compared to 4.2 [SPR-14577] #19146 When favorPathExtension is false ResourceHttpRequestHandler serves resources with different content type in 4.3 compared to 4.2