添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more

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.

upvote for mentioning Metabase.XML and I have listed various ways to change the file upload size limit because it might be useful. Durai Amuthan.H Feb 12 '14 at 12:41 Entering following command in command prompt helps increase file upload size limit."cscript C:\inetpub\adminscripts\adsutil.vbs set w3svc/ASPMaxRequestEntityAllowed 10484880" (in bytes) reference: serverintellect.com/support/iis/uploaddownload-size-limits-iis6 Durai Amuthan.H Feb 12 '14 at 12:42 or find metabase.xml in C:\windows\sytem32\inetserv\ path and edit but make sure Enable Direct metabase edit is enabled.reference: banmanpro.com/support2/file_upload_limits.asp Durai Amuthan.H Feb 12 '14 at 12:43 or In your web.config, add a line under your system.web <httpRuntime executionTimeout="54000" maxRequestLength="512000" /> weblogs.asp.net/mhawley/archive/2004/05/11/129824.aspx Durai Amuthan.H Feb 12 '14 at 12:43

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:

  • Nginx ( largest web server market share as of April 2019) - default 1MB , no practical maximum ( 2**63 )
  • Apache - maximum 2GB , no default documented
  • IIS - default 28.6MB for the request length, 2048 bytes for the query string; maximum undocumented
  • InfluxDB - default ~25MB , maximum undocumented
  • Of those answers that mention a webserver two mention IIS and one mentions Apache. Anyway, have edited my answer to signpost towards yours which is more complete and up to date. David Neale May 7 '19 at 7:59 Thank you @DavidNeale! There should be a badge for that :) I'll try to keep this answer updated. Just added the maximum for nginx. Dan Dascalescu May 9 '19 at 0:25 About this: "more data than the GET method, which is limited by the URL length - about 2KB." What about headers? Per this post it appears that headers allow for about 8-16KB . Hans Vonn Nov 6 '19 at 16:50 @DanDascalescu note that nginx is misspelled (as ngix) in the answer body and thus wasn't found initially in my text search. Brad Hein May 3 at 18:27 @BradHein: you have enough rep to edit answers; any reason why you didn't just do that? Dan Dascalescu May 9 at 0:37 Is 4GB still the maximum for Apache? I've found it documented to be 2GB. Dan Dascalescu May 6 '19 at 2:39 @DanDascalescu: I don't know, I haven't done this in a long time. Perhaps they started imposing an upper limit on the LimitRequestBody directive. Greg Hewgill May 6 '19 at 3:25

    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.

    Are there any rules of thumb for how much is getting dangerous for timeouts and such? vextorspace Dec 16 '14 at 20:14

    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 ;

    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!

    Good edit @Matt - shows the importance of snipping out the salient facts rather than blindly linking amelvin May 12 '16 at 13:59

    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.

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question . Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers .