Remove Content-* response headers before error handling in WebFlux #24238
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
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 inAbstractServerHttpResponse
Content-Type
(already done inRequestMappingHandlerAdapter
, this should move to the response itself)Content-Disposition
Content-Encoding
Content-Location
Content-Language
Content-Range
The text was updated successfully, but these errors were encountered: