Browse Source

Merge branch '3.1.x'

Closes gh-36092
pull/44233/head
Andy Wilkinson 3 years ago
parent
commit
6851904651
  1. 18
      spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerTests.java

18
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/embedded/UndertowWebServerFactoryCustomizerTests.java

@ -103,6 +103,24 @@ class UndertowWebServerFactoryCustomizerTests { @@ -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");

Loading…
Cancel
Save