ContentNegotiatingViewResolver does not support wildcards in contentType [SPR-9807] #14440
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Felix Barnsteiner opened SPR-9807 and commented
The following configuration won't work for accept headers containing e.g. application/vnd.foo.user+json (see also http://stackoverflow.com/questions/11880359/spring-mvc-3-1-1-contentnegotiatingviewresolver-how-to-use-wildcard-characters):
The reason is a wrong comparison in ContentNegotiatingViewResolver#getBestView:
Current:
The problem is application/vnd.foo.user+json does not include application/*+json, the opposite is true.
Expected:
Affects: 3.1.2
Reference URL: http://stackoverflow.com/questions/11880359/spring-mvc-3-1-1-contentnegotiatingviewresolver-how-to-use-wildcard-characters
Issue Links:
Referenced from: commits c7e7e80
The text was updated successfully, but these errors were encountered: