question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

The 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:closed
  • Created 4 years ago
  • Comments:16 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
wilkinsonacommented, Oct 7, 2019

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 onto setMaxFormContentSize and is specific to POSTed form content. As far as I can tell, content sent as a PUT 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 onto Undertow.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 like server.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 for server.jetty.max-http-post-size and server.tomcat.max-http-post-size. max-http-form-post-size would perhaps be a more accurate name.

1reaction
wilkinsonacommented, Aug 4, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found