http – Is there a limit on the size of data transmitted via POST?

Question:

I submitted a form via GET with a large amount of text (about 6000 characters) and got a URL too long error.

I did the same test via POST and the data was sent successfully.

My question is if there is a data limit to be transmitted via POST, because GET I already know it is limited.

Answer:

In theory the maximum limit of a post request is unlimited. The actual limit depends on each server application. Mateus already gave the tip on how this can be configured in Linux environments (which I don't understand anything about).

For applications running on Microsoft's IIS, you set the threshold through the IIS panel or the application's web.config file.

I won't go into detail here on how to configure these settings, but per the documentation the default request limit is thirty million bytes (approximately 28.6MB ). The maximum configurable limit is 4,294,967,295 bytes, approximately 4GB .

nodejs works with a default request limit of 80KB (see the HTTP_MAX_HEADER_SIZE variable in the source code ). Middlewares like Connect allow you to set higher limits, but then the maximum configurable limit will vary from middleware to middleware.

Scroll to Top