From b90113ac3332e8435d1cf14c486b6af6099ddfea Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Thu, 9 Aug 2018 15:34:06 +0900 Subject: [PATCH] Align server.tomcat.max-swallow-size with Tomcat's default value Closes gh-14025 --- .../boot/autoconfigure/web/ServerProperties.java | 2 +- .../src/main/asciidoc/appendix-application-properties.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java index 68bc334d47..c872465e47 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java @@ -332,7 +332,7 @@ public class ServerProperties { /** * Maximum amount of request body bytes to swallow. */ - private int maxSwallowSize = 4096; + private int maxSwallowSize = 2097152; /** * Whether requests to the context root should be redirected by appending a / to diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 53e2dc76f4..bfa76439a6 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -260,7 +260,7 @@ content into your application. Rather, pick only the properties that you need. server.tomcat.max-connections=0 # Maximum number of connections that the server accepts and processes at any given time. server.tomcat.max-http-header-size=0 # Maximum size, in bytes, of the HTTP message header. server.tomcat.max-http-post-size=0 # Maximum size, in bytes, of the HTTP post content. - server.tomcat.max-swallow-size=4096 # Maximum amount of request body bytes to swallow. + server.tomcat.max-swallow-size=2097152 # Maximum amount of request body bytes to swallow. server.tomcat.max-threads=0 # Maximum number of worker threads. server.tomcat.min-spare-threads=0 # Minimum number of worker threads. server.tomcat.port-header=X-Forwarded-Port # Name of the HTTP header used to override the original port value.