18.1.6 SHTTPD requirements for locating URIs

Source: Internet
Author: User
18.1.6 SHTTPD requirements for locating URIs

A URI is a shorthand for the universal Resource identy, meaning the same resource identifier, a formatted string that determines the location of network resources by name, address, or other characteristics. URIs are already well known, such as the WWW address, the common file identifier, the Uniform Resource Locator (URL), the Uniform Resource Name (URN), and so on. 1. General syntax for URIs

The representation of a URI can be either an absolute form in HTTP or a relative form compared to a known URI. The difference between the two forms is that an absolute URI begins with the digest name of a protocol, followed by a colon. For example, http://www.sina.com.cn is an absolute URI, and www.sina.com.cn is a relative URI.

For a request to a URI, the HTTP protocol does not limit the length, and the server must handle any URI resource requests that arrive at the server and be able to handle an infinitely long URI. Of course, the actual server always has the length limit of the URI request. 2. HTTP URL

The HTTP protocol gives the location of network resources through the HTTP protocol. The form is as follows:

Http_url = "http:"//"host [": "Port] [Abs_path ["? "query]]

That is, "http:" followed by "//", then the name of the host, followed by the host's port. Then the request resource for the host, if it is later "?" A parameter to the server is followed.

In this form, if the port is empty or not given, the system uses the default value of 80. 3. URI comparison

The URI is case-sensitive, that is, comparing two URIs, the string must be treated according to the case of two different resources. The exceptions are as follows:

Q The port of the URI is the default value when the requested port for the resource is not given or is empty.

Q The comparison of host names in the URI must be case-insensitive, for example WWW.SINA.COM.CN and www.sina.com.cn are the same URIs.

The name comparison of the Q protocol must be case-insensitive, for example HTTP://www.sina.com.cn and http://www.sina.com.cn are identical URIs.

In addition to the characters in the "reserved" or "dangerous" set, the characters are equivalent to their "% HEX HEX" encoding ... The following 3 URIs are equivalent:

Http://sina.com:80/index.html

Http://sina.com/index.html

Http://SINA.com:/index.html

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.