mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-26 11:39:14 +00:00
Test server.max-http-request-header-size with Undertow
Closes gh-36047
This commit is contained in:
+18
@@ -103,6 +103,24 @@ class UndertowWebServerFactoryCustomizerTests {
|
||||
assertThat(boundServerOption(UndertowOptions.MAX_HEADER_SIZE)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void customMaxHttpRequestHeaderSize() {
|
||||
bind("server.max-http-request-header-size=2048");
|
||||
assertThat(boundServerOption(UndertowOptions.MAX_HEADER_SIZE)).isEqualTo(2048);
|
||||
}
|
||||
|
||||
@Test
|
||||
void customMaxHttpRequestHeaderSizeIgnoredIfNegative() {
|
||||
bind("server.max-http-request-header-size=-1");
|
||||
assertThat(boundServerOption(UndertowOptions.MAX_HEADER_SIZE)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void customMaxHttpRequestHeaderSizeIgnoredIfZero() {
|
||||
bind("server.max-http-request-header-size=0");
|
||||
assertThat(boundServerOption(UndertowOptions.MAX_HEADER_SIZE)).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void customMaxHttpPostSize() {
|
||||
bind("server.undertow.max-http-post-size=256");
|
||||
|
||||
Reference in New Issue
Block a user