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

Remove quality parameter from chosen media type in WebFlux responses #24239

Closed
bclozel opened this issue Dec 20, 2019 · 0 comments
Closed

Remove quality parameter from chosen media type in WebFlux responses #24239

bclozel opened this issue Dec 20, 2019 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Dec 20, 2019

When processing requests and working on the Content Negotiation for WebFlux Controller handlers, HandlerResultHandlerSupport:

  • get the list of accepted media types from the request
  • get the list of producible media types from the handler
  • select the most specific, concrete media type and use it for the response

It seems that when doing so, WebFlux does not remove the quality parameter from the media type, which means that the response can have a response header like Content-Type: application/json; q=0.9.

This quality parameter is properly removed in AbstractMessageConverterMethodProcessor for Spring MVC, we should do the same here.

@bclozel bclozel added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement labels Dec 20, 2019
@bclozel bclozel added this to the 5.2.3 milestone Dec 20, 2019
@bclozel bclozel self-assigned this Dec 20, 2019
@bclozel bclozel closed this as completed in 75fd391 Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant