The URL is the abbreviation for Uniform Resource location, the Chinese term is "Uniform Resource Locator".
The URI is the abbreviation for uniform Resource identifiers, and the Chinese term is "Uniform Resource Identifier".
Usually, when we enter an address such as "http://www.example.com/example/index.html" in the browser, this string can be called a URL, so how many bytes does the URL support the longest? In theory, there is no limit to the length of URLs, and we are now discussing the limits of URL lengths in the context of HTTP protocol: in the definition of HTTP1.0 RFC1945, there is no reference to the length of the URL, and the RFC2616 of the definition HTTP1.1 describes the problem:
......
The HTTP protocol does not place any a priori limit on the length of a URI. Servers must is able to handle the URI of an any resource they, serve, and SHOULD is able to handle URIs of unbounded of length I F They provide get-based forms that could generate such. A Server SHOULD return 414 (Request-uri Too Long) status if a URI is longer than the server can handle.
......
RFC2616 does not limit the length of URLs and URIs, so it can theoretically write infinitely long URLs, but returns a 414 status code if the server finds that the URL is too long to process.
In actual use, the URL can not be infinitely long, there is a certain limit, this restriction on both the client (browser) and the server side exist, we do a little experiment to see the URL in the common browser and server restrictions:
Test environment:
Client operating system: Windows XP SP2
Client: IE6.0 firefox2.0.0.5
Service-side operating system: RedHat Advanced Server 4 2.6.9-5.el #1
Service side: Apache1.3.36
Analysis tools: tcpdump PHP
After testing, IE6.0 's longest byte number for the 2047,firefox2.0.0.5 support URL is longer, exceeding the Apache limit of 8190 (if the URL exceeds the browser limit, the browser to automatically intercept the URL, the redundant part of the discard);
The maximum length of the server-side apache1.3.36 is 8190 (Yuhong default_limit_request_line decision).
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.