- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38.8k
Description
Oliver Drotbohm opened SPR-10513 and commented
The mechanism in place to configure a default media type is currently applied to default the requested media types. So it is essentially only kicking in if the client either sends no Accept header at all or an empty header. Unfortunately most clients send \*/\* to indicate they don't have a preference.
This causes FixedContentNegotiationStrategy to never get called, as Accept:\*/\* essentially causes the HeaderContentNegotiationStrategy to return a value and that skips the remaining strategies.
\*/\* in turn indicates all HttpMessageConverters being tried which might cause one being picked that doesn't reflect the requested default (e.g. imagine a class annotated with @XmlRootElement and the defaulting configured to JSON. It would still be rendered as XML as the JAXB-based converter comes before the Jackson one).
Affects: 3.2.2
Issue Links:
- 3.2.4 View Resolver Issue when defaultContentType Property Defined [SPR-10836] #15462 3.2.4 View Resolver Issue when defaultContentType Property Defined
1 votes, 2 watchers