Can HTTP POST be limitless?

HttpFormsPostLimit

Http Problem Overview


I heard that HTTP POST has no specification limit in data size it can be sent by. Is that true or is there just some really high limit?

Http Solutions


Solution 1 - Http

Quite amazing how all answers talk about IIS, as if that were the only web server that mattered. Even back in 2010 when the question was asked, Apache had between 60% and 70% of the market share. Anyway,

  • The HTTP protocol does not specify a limit.
  • The POST method allows sending far more data than the GET method, which is limited by the URL length - about 2KB.
  • The maximum POST request body size is configured on the HTTP server and typically ranges from
    1MB to 2GB
  • The HTTP client (browser or other user agent) can have its own limitations. Therefore, the maximum POST body request size is min(serverMaximumSize, clientMaximumSize).

Here are the POST body sizes for some of the more popular HTTP servers:

Solution 2 - Http

EDIT (2019) This answer is now pretty redundant but there is another answer with more relevant information.

It rather depends on the web server and web browser:

Internet explorer All versions 2GB-1
Mozilla Firefox All versions 2GB-1
IIS 1-5 2GB-1
IIS 6 4GB-1

Although IIS only support 200KB by default, the metabase needs amending to increase this.

http://www.motobit.com/help/scptutl/pa98.htm

The POST method itself does not have any limit on the size of data.

Solution 3 - Http

There is no limit according to the HTTP protocol itself, but implementations will have a practical upper limit. I have sent data exceeding 4 GB using POST to Apache, but some servers did have a limit of 4 GB at the time.

Solution 4 - Http

POST allows for an arbitrary length of data to be sent to a server, but there are limitations based on timeouts/bandwidth etc.

I think basically, it's safer to assume that it's not okay to send lots of data.

Solution 5 - Http

Different IIS web servers can process different amounts of data in the 'header', according to this (now deleted) article; http://classicasp.aspfaq.com/forms/what-is-the-limit-on-form/post-parameters.html</s>;;

> Note that there is no limit on the > number of FORM elements you can pass > via POST, but only on the aggregate > size of all name/value pairs. While > GET is limited to as low as 1024 > characters, POST data is limited to 2 > MB on IIS 4.0, and 128 KB on IIS 5.0. > Each name/value is limited to 1024 > characters, as imposed by the SGML > spec. Of course this does not apply to > files uploaded using > enctype='multipart/form-data' ... I > have had no problems uploading files > in the 90 - 100 MB range using IIS > 5.0, aside from having to increase the server.scriptTimeout value as well as > my patience!

Solution 6 - Http

HTTP may not have an upper limit, but webservers may have one. In ASP.NET there is a default accept-limit of 4 MB, but you (the developer/webmaster) can change that to be higher or lower.

Solution 7 - Http

In an application I was developing I ran into what appeared to be a POST limit of about 2KB. It turned out to be that I was accidentally encoding the parameters into the URL instead of passing them in the body. So if you're running into a problem there, there is definitely a very small limit on the size of POST data you can send encoded into the URL.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionIAdapterView Question on Stackoverflow
Solution 1 - HttpDan DascalescuView Answer on Stackoverflow
Solution 2 - HttpDavid NealeView Answer on Stackoverflow
Solution 3 - HttpGreg HewgillView Answer on Stackoverflow
Solution 4 - HttpRuss ClarkeView Answer on Stackoverflow
Solution 5 - HttpamelvinView Answer on Stackoverflow
Solution 6 - HttpHans KestingView Answer on Stackoverflow
Solution 7 - HttpbrycejlView Answer on Stackoverflow