Regarding the limitation of the submission length of GET and POST methods in HTTP (return)

Regarding the limitation of the submission length of GET and POST methods in HTTP

Preface

The HTTP protocol itself does not limit the data size of the GET/POST method, but different browsers or server processing programs have different processing methods or capabilities, and there will be corresponding restrictions.

One, GET method

There is no limit on the size and length of the data submitted by the Http Get method, and the HTTP protocol specification does not limit the length of the URL. This restriction is a restriction imposed by a specific browser and server.

For example: IE's limitation on URL length is 2083 bytes (2K+35).

The following is a description of the maximum processing capabilities of various browsers and servers.

Microsoft Internet Explorer (Browser)

The maximum limit IE browser to a URL for the 2083 Ge characters , if more than this number, the submit button nothing happens.
Firefox (Browser)

The URL length limit for the Firefox browser is 65,536 characters.

Safari (Browser)

The maximum URL length is limited to 80,000 characters.

Opera (Browser)

The maximum URL length is limited to 190,000 characters.

Google (chrome)

The maximum URL length is limited to 8182 characters.

Apache (Server)

The maximum url length that can be accepted is 8,192 characters.

Microsoft Internet Information Server(IIS)

The maximum url length that can be accepted is 16,384 characters.

According to the above data, in order to allow all users to browse normally, the URL should not exceed the maximum length of IE (2083 characters). Of course, if the URL is not directly provided to the user, it is provided to the program to call. The length of the time is only affected by the web server.

Note: For the transmission of Chinese, the encoding form after urlencode will be finally transmitted. If the encoding of the browser is UTF8, the final encoded character length of a Chinese character is 9 characters.

Therefore, if the GET method is used, the maximum length is equal to the maximum length of the URL minus the number of characters in the actual path.

Two, POST method

In theory, there is no size limit for POST. The HTTP protocol specification also does not impose a size limit, and the limitation is the processing capacity of the server's processing program.

Guess you like

Origin blog.csdn.net/wdhxs/article/details/114586717