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 Content-* response headers before error handling in WebFlux #24238

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

Remove Content-* response headers before error handling in WebFlux #24238

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

As a follow up of #22034 and other related issues, we should clear all Content-* response headers in case of errors, if the response is not committed already.

In this case, we need to remove all assumptions about the response that was going to be written when the error happened. WebFlux error handlers may write a very different response body, or not response body at all.

We should then remove the following headers, in AbstractServerHttpResponse:

  • Content-Length (already done in AbstractServerHttpResponse
  • Content-Type (already done in RequestMappingHandlerAdapter, this should move to the response itself)
  • Content-Disposition
  • Content-Encoding
  • Content-Location
  • Content-Language
  • Content-Range
@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 f9c1565 Jan 6, 2020
bclozel added a commit that referenced this issue Jan 7, 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