Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List available media types for 406 Not Accepted response [SPR-15899] #20453

spring-projects-issues opened this issue Aug 24, 2017 · 3 comments
in: web status: declined type: enhancement


Copy link

spring-projects-issues commented Aug 24, 2017

Yi EungJun opened SPR-15899 and commented

It would be helpful if the payload of 406 Not Accepted response contains a list of available media types so that client choose one of them, as outlined in RFC 7231.

The server SHOULD generate a payload containing a list of available
representation characteristics and corresponding resource identifiers
from which the user or user agent can choose the one most
appropriate. A user agent MAY automatically select the most
appropriate choice from that list. However, this specification does
not define any standard for such automatic selection, as described in
Section 6.4.1.

No further details from SPR-15899

@spring-projects-issues spring-projects-issues added type: enhancement in: web labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.x Backlog milestone Jan 11, 2019
Copy link

rstoyanchev commented Jan 29, 2019

Spring MVC does not send error details in the response. It's left to applications to determine how to format error responses, see the docs. If you override the handling of HttpMediaTypeNotAcceptableException you can access the list of media types from it.

@rstoyanchev rstoyanchev removed this from the 5.x Backlog milestone Jan 29, 2019
@rstoyanchev rstoyanchev added the status: declined label Jan 29, 2019
Copy link

izeye commented Feb 22, 2019

This looks meant to be closed.

Copy link

snicoll commented Feb 22, 2019

Indeed, thanks!

@snicoll snicoll closed this as completed Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: web status: declined type: enhancement
None yet

No branches or pull requests

4 participants