URL Maximum length

Source: Internet
Author: User
Tags ticket

Today, when testing email ticket, it was found that the request was made by the Get method when the mark as Read/unread operation was performed. All ticket IDs that participate in the operation are listed in the URL. As a result, I recall that the GET request has a maximum length limit. Then enter a long string of ticket ID to request, the result page error is as follows:

HTTP Error 404.15-not FoundThe request filtering module is configured to deny a request where the query string is too long.

Most likely causes:

    • Request filtering is configured on the WEB server to deny the request because the query string is too long.

Things you can try:

    • Verify the Configuration/system.webserver/security/requestfiltering/[email protected] setting in the ApplicationHost.config or Web. config file.

Links and more informationthis are a security feature. The feature unless the scope of the change is fully understood. You can configure the IIS server to reject requests whose query string is greater than a specified value. If the request ' s query string is greater than the configured value, this error is returned. If the allowed length of the query string needs to be increased, modify the Configuration/system.webserver/security/reques Tfiltering/[email protected] setting.

View more information»

After a search, IIS 7 was found to have a length limit for query string. The default is 2048.

The solution to this problem can be modified by Configuration/system.webserver/security/requestfiltering/[email protected] setting.

<requestlimits maxquerystring= "Length"/>

Specifically, you can view the Microsoft Kb:error message when you visit a Web site, that's hosted on a server, which is running IIS 7.0: "HTTP Error 404.15 –not Found "

The search process found that the URLs of each browser and Web server are limited in length as follows:

In the HTTP protocol, there is no limit to the length of the URL, often the maximum length of the URL and the user browser and Web server, different browsers, the maximum acceptable length is often different, of course, not the same Web server can handle the maximum length of the URL is not the same ability.
The following is a description of the maximum processing power of various browsers and servers.

Microsoft Internet Explorer (Browser)
Internet Explorer has a maximum URL limit of 2,083 characters, and if this number is exceeded, the submit button has no response. In my test, this number is verified.

Microsoft Official also stated:

Microsoft Internet Explorer has a maximum Uniform Resource Locator (URL) length of 2,083 characters. Internet Explorer also has a maximum path length of 2,048 characters. This limit applies to both POST request and GET request URLs.
If you is using the GET method, you is limited to a maximum of 2,048 characters, minus the number of characters in the A Ctual path.
However, the POST method is not limited by the size of the URL for submitting name/value pairs. These pairs is transferred in the header and the URL.

Firefox (Browser)

The length of the Firefox browser URL is limited to 65,536 characters, but when I test, the maximum can only handle 8,182 characters, because the length of the URL in addition to browser restrictions, but also by the Web server restrictions, and I am using the Ubuntu Apache server, The maximum processing power is 8,192 characters (10 characters apart, do not know what the reason), once this length is exceeded, the server returns the following error message.

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)
Once the URL length exceeds 8,182 characters, the following server error occurs:

Wrote

Request-uri Too Large
The requested URL ' s length exceeds the capacity limit for this server.
apache/2.2.12 (Ubuntu) Server at 127.0.1.1 Port 80

Apache (Server)
Can accept the maximum URL length of 8,192 characters, but my test data is 8,182, 10 characters, the difference is not, the data is specific.

Microsoft Internet Information Server (IIS)
The maximum URL that can be accepted is 16,384 characters long.

Through the above data, in order to allow all users to browse normally, our URL should not exceed the maximum length of IE limit (2038 characters), of course, if the URL is not directly provided to the user, but rather to the program calls, the length of the side is only affected by the Web server.

Note: Some friends may take it for granted that if the maximum length is limited to 2038 characters, it is not possible to pass about 1000 or so characters in a parameter. In fact, this is not true, for the transmission of Chinese, will eventually be urlencode after the encoding of the form of transmission, if the browser encoding is UTF8, a Chinese character after the final encoding of the length of 9 characters.

URL Maximum length

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.