Uh oh!
There was an error while loading. Please reload this page.
[fix](http) Fix jetty_server_max_http_header_size not applied in Jetty 12 - #61197
Conversation
In Jetty 12 + Spring Boot 3, the server.max-http-header-size property is not automatically applied to custom HttpConfiguration objects. This causes HTTP 431 errors when header size exceeds the default 8KB. This fix explicitly sets requestHeaderSize on all connectors to ensure the configuration is properly applied. Fixes: CIR-19619 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hello-stephen
commented
Mar 10, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Add test to verify that large HTTP headers (100KB) are properly handled after fixing jetty_server_max_http_header_size configuration.
afae2eb to
7ca4f82Compareliaoxin01
commented
Mar 10, 2026
run buildall |
There was a problem hiding this comment.
Pull request overview
Fixes Jetty 12/Spring Boot 3 behavior where jetty_server_max_http_header_size was not being applied, causing HTTP 431 errors for large request headers.
Changes:
- Apply
requestHeaderSizeto each Jetty connector’sHttpConfigurationvia a server customizer. - Add a regression test that sends a 100KB request header to verify large headers are accepted.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| regression-test/suites/http_p0/test_large_http_header.groovy | Adds regression coverage for large request headers (expects non-431). |
| fe/fe-core/src/main/java/org/apache/doris/httpv2/config/WebServerFactoryCustomizerConfig.java | Ensures Jetty connectors inherit configured max request header size under Jetty 12. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
doris-robot
commented
Mar 10, 2026
TPC-H: Total hot run time: 27894 ms |
doris-robot
commented
Mar 10, 2026
TPC-DS: Total hot run time: 153673 ms |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
Uh oh!
There was an error while loading. Please reload this page.
…y 12 (apache#61197) HTTP 431 "Request Header Fields Too Large" error occurs when sending requests with large headers (>8KB) to FE, even though `jetty_server_max_http_header_size` is configured to 10MB. This issue appears in cloud-4.1.2 (Jetty 12 + Spring Boot 3) but not in cloud-4.0.10 (Jetty 9 + Spring Boot 2). In Jetty 12 with Spring Boot 3, the `server.max-http-header-size` property does not automatically apply to custom `HttpConfiguration` objects created in `WebServerFactoryCustomizer`. The default 8KB limit remains in effect. Explicitly set `requestHeaderSize` on all server connectors in `WebServerFactoryCustomizerConfig` by adding a server customizer that configures the `HttpConfiguration` for each connector. - Added regression test `test_large_http_header.groovy` that verifies 100KB headers are accepted - Verified before fix: HTTP 431 error with large headers - Verified after fix: HTTP 200 success with large headers
…y 12 (apache#61197) HTTP 431 "Request Header Fields Too Large" error occurs when sending requests with large headers (>8KB) to FE, even though `jetty_server_max_http_header_size` is configured to 10MB. This issue appears in cloud-4.1.2 (Jetty 12 + Spring Boot 3) but not in cloud-4.0.10 (Jetty 9 + Spring Boot 2). In Jetty 12 with Spring Boot 3, the `server.max-http-header-size` property does not automatically apply to custom `HttpConfiguration` objects created in `WebServerFactoryCustomizer`. The default 8KB limit remains in effect. Explicitly set `requestHeaderSize` on all server connectors in `WebServerFactoryCustomizerConfig` by adding a server customizer that configures the `HttpConfiguration` for each connector. - Added regression test `test_large_http_header.groovy` that verifies 100KB headers are accepted - Verified before fix: HTTP 431 error with large headers - Verified after fix: HTTP 200 success with large headers
* [fix](fe) Apply Jetty HTTP size configurations ### What problem does this PR solve? Issue Number: None Related PR: apache#61197 Problem Summary: Spring Boot 3.5 no longer binds the obsolete HTTP header and Jetty form POST size properties. This leaves Jetty request headers at the 8 KiB default and the form POST limit at its framework default. Apply the current property names and configure every HTTP/HTTPS connector after connector creation. ### Release note Make jetty_server_max_http_header_size and jetty_server_max_http_post_size effective with Spring Boot 3 and Jetty 12. ### Check List (For Author) - Test: - Checkstyle: mvn -pl fe-core checkstyle:check -DskipTests (passed) - FE build and regression test: deferred for follow-up unified validation - Behavior changed: Yes. Configured Jetty request-header and form POST limits now take effect. - Does this need documentation: No. * [fix](regression) Support TLS in large header test ### What problem does this PR solve? Issue Number: None Related PR: #81 Problem Summary: The large HTTP header regression test hard-coded the HTTP protocol and did not initialize the TLS trust or key stores. It could fail in TLS-enabled regression runs before validating the configured Jetty header limit. Reuse the TLS-aware HTTP test action so the case selects HTTP or HTTPS from the regression configuration. ### Release note None ### Check List (For Author) - Test: - Static check: git diff --check (passed) - Regression test: not run; deferred for follow-up unified validation - Behavior changed: No. Test-only change. - Does this need documentation: No. * [test](regression) Assert 431 for oversized HTTP header
Problem
HTTP 431 "Request Header Fields Too Large" error occurs when sending requests with large headers (>8KB) to FE, even though
jetty_server_max_http_header_sizeis configured to 10MB.This issue appears in cloud-4.1.2 (Jetty 12 + Spring Boot 3) but not in cloud-4.0.10 (Jetty 9 + Spring Boot 2).
Root Cause
In Jetty 12 with Spring Boot 3, the
server.max-http-header-sizeproperty does not automatically apply to customHttpConfigurationobjects created inWebServerFactoryCustomizer. The default 8KB limit remains in effect.Solution
Explicitly set
requestHeaderSizeon all server connectors inWebServerFactoryCustomizerConfigby adding a server customizer that configures theHttpConfigurationfor each connector.Testing
test_large_http_header.groovythat verifies 100KB headers are accepted