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

Avoid setting special Content-* response headers in TomcatHeadersAdapter #24361

Closed
bclozel opened this issue Jan 15, 2020 · 0 comments
Closed
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Jan 15, 2020

Currently TomcatHeadersAdapter directly writes to the MimeHeaders map, as part of the performance improvements in #21783. We are also applying specific changes on the response in org.springframework.http.server.reactive.TomcatHttpHandlerAdapter.TomcatServerHttpResponse for the Content-Length and Content-Type response headers.

The problem is we're still writing those headers to the underlying map, which means those headers are written no matter what happens to the response, even if other parts of Tomcat codebase are removing them using the expected API.

We should never add those headers to the map in the first place.

See Tomcat issue for background information.

@bclozel bclozel added the type: bug A general bug label Jan 15, 2020
@bclozel bclozel added this to the 5.2.4 milestone Jan 15, 2020
@bclozel bclozel self-assigned this Jan 15, 2020
@rstoyanchev rstoyanchev added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Jan 16, 2020
@bclozel bclozel added the for: backport-to-5.1.x Marks an issue as a candidate for backport to 5.1.x label Jan 17, 2020
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.1.x Marks an issue as a candidate for backport to 5.1.x labels Jan 17, 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) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants