-
Couldn't load subscription status.
- Fork 41.6k
Rename max-http-post-size server property
#18566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...ava/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizer.java
Show resolved
Hide resolved
...onfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
Show resolved
Hide resolved
...g/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for the pull request, @rhamedy. Please let us know if you have the time to make the requested changes in the next few days. No problem at all if you don't, we can make the changes in a polishing commit as part of merging your changes.
...autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
Outdated
Show resolved
Hide resolved
...autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
Outdated
Show resolved
Hide resolved
...autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
Outdated
Show resolved
Hide resolved
...autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
Show resolved
Hide resolved
...autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
Outdated
Show resolved
Hide resolved
...ava/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizer.java
Show resolved
Hide resolved
...va/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.java
Outdated
Show resolved
Hide resolved
...onfigure/src/test/java/org/springframework/boot/autoconfigure/web/ServerPropertiesTests.java
Show resolved
Hide resolved
...g/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java
Outdated
Show resolved
Hide resolved
...g/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizerTests.java
Outdated
Show resolved
Hide resolved
|
Hi @wilkinsona Out of curiosity, is this Thanks for the help. |
|
Things look good now. Thank you for the updates. Let's mark the old getters and setters as |
|
Hi @wilkinsona |
Due to the unclarity that properties server.tomcat.max-http-post-size and server.jetty.max-http-post-size only apply to POSTed form content, the two properties are deprecated in favor of newly introduced server properties server.tomcat.max-http-form-post-size & server.jetty.max-http-form-post-size. Fixes spring-projectsgh-18521
Rename `max-http-post-size` to `max-http-form-post-size` for Jetty and Tomcat to make it clearer that they only apply to POSTed form content. See gh-18566
max-http-post-size server property
|
Thanks a lot @rhamedy! This is now in 2.1.x and master. |
Fixes #18521
@wilkinsona here is a summary of changes
ServerProperties.javato deprecate themax-http-post-sizefor both tomcat and jersey and introduced replacementsmax-http-form-post-sizeServerPropertiesTests.javato add new tests fortomcatMaxHttpFormPostSizeMatchesConnectorDefaultServerPropertiesTests.javato add new test forjettyMaxHttpFormPostSizeMatchesDefault(this test is 99% same asjettyMaxHttpPostSizeMatchesDefault, what do you think about refactoring common code?)TomcatWebServerFactoryCustomizer.javafor the new propertymaxHttpFormPostSizeand added tests for it inTomcatWebServerFactoryCustomizerTests.javawithout
bind("server.tomcat.max-http-form-post-size=10000");this test andcustomDisableMaxHttpPostSizefails. This is due to addition of the new property but, when binding both as shown above then it passes. Not sure if it's because both these props point to the same property in connector or because I messed up the mapping in customizers.JettyWebServerFactoryCustomizerfor the new propertyNot sure if I missed out anything that needs to be updated. I would appreciate a review and will
squashmy commits once all the code review comments are addressed.Thanks.