Recently, it is found that when the company's background system uses Firefox to operate news through RSS, the page is normal, but when IE7 or 6 is used, information is garbled during News browsing. After checking, it is found that the value is passed through the URL. Therefore, encodeuricomponent is used to encode the URL string content. The problem is solved, but sometimesThe request Filtering module is configured to deny a request where the query string is too long,The cause is that there is a limit on the length when the string is transmitted in get mode.
IIS 7 has a length limit on query strings. 2048 by default.
To solve this problem, modify configuration/system. webserver/security/requestfiltering/requestlimits @ maxquerystring setting.
<Requestlimits maxquerystring = "length"/>
Each browser and each web server have the following restrictions on the URL Length:
In the HTTP protocol, the URL length is not limited. The maximum URL length is usually related to the user's browser and the web server, the maximum length that can be accepted is often different. Of course, the maximum length of URLs that can be processed by different Web servers is also different.
The following describes the maximum processing capabilities of various browsers and servers.
Microsoft Internet Explorer (browser)
The maximum URL limit of IE browser is2083If the number is exceeded, the submit button does not respond.
Firefox (browser)
The URL Length of the Firefox browser is limited to 65,536 characters, but when I test it, it can only process a maximum of 8182 characters, because the URL length is not limited by the browser, it is also limited by Web servers.
Safari (browser)
The maximum length of a URL is 80,000 characters.
Opera (browser)
The maximum length of a URL is 190,000 characters.
Google (chrome)
If the URL length exceeds 8182 characters, the following server error occurs:
Write
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)
The maximum length of a URL is 8,192 characters.
Microsoft Internet Information Server (IIS)
The maximum allowed URL length is 16,384 characters.
We can see from the above data that, in order to make all users can browse normally, our URL should not exceed the maximum length limit of IE (2038 characters), of course, if the URL is not directly provided to the userProgramThe length of the side is only affected by the Web server.
Some may take it for granted that if the maximum length is 2038 characters, is it possible that the parameter can pass about 1000 Chinese characters. In this case, it is not correct. The transmission of Chinese characters will eventually be passed in the URL encoded format. If the browser code is utf8, the final encoding length of a Chinese character is 9 characters.