It is unclear that server.tomcat.max-http-post-size and server.jetty.max-http-post-size only apply to POSTed form content
See original GitHub issueThe documentation describes the following:
server.tomcat.max-http-post-size=2MB # Maximum size of the HTTP post content.
However this setting only affects post requests with FORM content, not all post requests. This can lead to confusion for myself and others (as per stackoverflow questions). A more precise description would be helpful, such as:
server.tomcat.max-http-post-size=2MB # Maximum size of the FORM content in an HTTP post request. Non-FORM post requests are unaffected by this property.
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (13 by maintainers)
Top Results From Across the Web
Increase HTTP Post maxPostSize in Spring Boot
In application.properties file write this: # Max file size. spring.http.multipart.max-file-size=1Mb # Max request size.
Read more >Tomcat Server - Request Size - Medium
maxPostSize represents the size limit which can be downloaded or request can be received at the tomcat(incoming request). Apply this properties ...
Read more >Appendix A. Common application properties - Spring
This sample file is meant as a guide only. Do not copy/paste the entire content into your application; rather pick only the properties...
Read more >Spring Boot and Embedded Servers - Tomcat, Jetty and ...
max-http-post-size =0 # Maximum size in bytes of the HTTP post or put content. server.jetty.selectors= # Number of selector threads to use. You ......
Read more >Spring Boot common application properties - Andrei Pall
accesslog.time-zone=GMT # Timezone of the request log. server.jetty.max-http-post-size=200000B # Maximum size of the HTTP post or put content.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We have a similar problem with Jetty. The property,
server.jetty.max-http-post-size
, is described as “Maximum size of the HTTP post or put content” but it maps ontosetMaxFormContentSize
and is specific to POSTed form content. As far as I can tell, content sent as aPUT
is not affected.Undertow is also affected but the problem is different. The property,
server.undertow.max-http-post-size
, is described as “Maximum size of the HTTP post content. When the value is -1, the default, the size is unlimited”. It maps ontoUndertow.MAX_ENTITY_SIZE
which isn’t limited to form content but also isn’t limited to POST requests. The property would be better named something likeserver.undertow.max-http-entity-size
.Given that we need to deprecate
server.undertow.max-http-post-size
and provide a replacement, I wonder if we should do similar forserver.jetty.max-http-post-size
andserver.tomcat.max-http-post-size
.max-http-form-post-size
would perhaps be a more accurate name.Unfortunately, I can’t say why it’s happening from a couple of code snippets. We need to see more of your application – for example exactly how the browser is sending the information to the controller – but a closed issue isn’t the right place. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. If you believe that you’ve found a bug, and you would like us to spend some more time investigating, please open a new issue and spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to the issue that you open.