Current behaviour concerning Tomcat max HTTP Header size:

In TomcatWebServerFactoryCustomizer it is only possible to set "maxHttpRequestHeaderSize".

server.maxHttpRequestHeaderSize = 5MB

Desired extension

In some cases, Response Headers are also higher that allowed by Tomcat but this property cannot be modified. It would be good to add this possibility also in spring configuration file.

server.maxHttpResponseHeaderSize = 5MB

Kind regards,

Comment From: bclozel

Hello @tazouxme

As seen in #29382, I don't think we can apply this at the "server.*" as this wouldn't be consistent for all servers at this point. We can consider introducing a Tomcat specific property.

In the meantime you can use a Tomcat server customizer to achieve this in your application.

Comment From: scottfrederick

Closing in favor of #33553.