Skip to content

Tomcat server.max-http-header-size property is ignored when using HTTP/2 #31322

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

Closed
kzwang opened this issue Jun 9, 2022 · 0 comments
Closed
Labels
type: bug A general bug
Milestone

Comments

@kzwang
Copy link

kzwang commented Jun 9, 2022

There is a server.max-http-header-size property to change the max header size limit, however, for tomcat Http2Protocol, that property doesn't take effect, it still uses the default 8kb limit.

https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java#L339 I think this needs to be updated to configure the Http2Protocol with setMaxHeaderSize

We can work around the issue with TomcatConnectorCustomizer, but ideally that single property can affect http2 as well to be consistent

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 9, 2022
@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 9, 2022
@philwebb philwebb added this to the 2.6.x milestone Jun 9, 2022
@philwebb philwebb changed the title Cannot configure tomcat http2 max header size via property Tomcat server.max-http-header-size property is ignored when using HTTP/2 Jun 9, 2022
@wilkinsona wilkinsona modified the milestones: 2.6.x, 2.6.9 Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants