Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the size limit of a post request?

Sorry if this is duplicate,I would think it would be but couldn't find anything.

I have a flex application that I am posting data back to a php/mysql server via IE. I haven't run into any problems yet, but knowing this ahead of time might save me a bunch of frustration and work. Is there a size limit to posting data via http?

This article says no: http://www.netlobo.com/ie_form_submit.html

This discussion says yes: http://bytes.com/topic/php/answers/538226-what-maximum-limit-using-post-method

And it all goes back and forth what I'm able to find online. So please limit answers to personally tested/verified numbers.

I am wanting to post back an XML string that can be quite large (say up to 5mb).

If it makes any difference: browser will always be IE (our product requires it), post is coming from and httpService in flex, web server is php, DB is mySql.

like image 917
invertedSpear Avatar asked Mar 02 '10 16:03

invertedSpear


People also ask

Is there a limit to the size of a POST request?

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

What is the size of a GET request?

Most web servers have a limit of 8192 bytes (8 KB), which is usually configurable somewhere in the server configuration.

How do I know my HTTP request size?

You can Use HTTPRequest and HTTPResponse class method getBodyAsBlob(); to get the response body in blob and then you can check the size. httpRequest. getBodyAsBlob(). size(); httpResponse.

How big can an HTTP response be?

The response limit is 9,223,372,036,854,775,807 bytes (2 ** 64).


1 Answers

It depends on a server configuration. If you're working with PHP under Linux or similar, you can control it using .htaccess configuration file, like so:

#set max post size php_value post_max_size 20M 

And, yes, I can personally attest to the fact that this works :)

If you're using IIS, I don't have any idea how you'd set this particular value.

like image 166
brettkelly Avatar answered Oct 12 '22 22:10

brettkelly