ServletResponseHttpHeaders
ignores content type in ServletResponse
#32339
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
The Servlet API doesn't say that
Content-Type
has to be available inServletResponse.getHeader()
and Tomcat actually takes explicit steps to ensure it is not stored as a header (despite being sent as a header to the remote client). So a lot of busywork goes on in Spring if the content type has been set explicitly but is coming back fromServletResponseHttpHeaders
as null. Undertow (in contrast) internally chooses to store the content type as a header, so the two servers behave differently and Undertow is faster if the content type is explicitly set.The text was updated successfully, but these errors were encountered: