Basic knowledge of HTTP protocol

Source: Internet
Author: User

1, Http-url:

Protocol, host number: The IP address of a server; Port number: The host above the program number, the general default of 80, many browsers omit not to display; path: directory of work paths

URL Request:

Access host number 123.207.58.25 this host under the 80th service under the root directory under the A directory under the c.php resource, and the submitted data is a=100 and b=20, most browsers in the middle of the URL? Separate the data we want to submit and use & to differentiate each data. The submitted data has always been in the form of Name=value.

2. http-Request

For a URL, https://123.207.58.25:80/a/b/c.php?a=100&b=20, remove the HTTPS, remove the IP, remove the port number, the remaining (a/b/c.php?a=100&b= 20) is the data stored in the URL field.

The data in the request line is:

get/a/b/c.php?a=100&b=20 http/1.0\r\n Note: 1. Get and,/a ... There is a space between b=20 and http/1.0 there is a space between 2. The identity of the \ r \ n of each line is not only the first line, but also the rule is \ r \ n does not allow a separate method field: Get: Request the resource identified by the URL, Method: Enter the URL in the address bar of the browser, the browser uses the Get method post: Attach a new resource after the resource identified by the URL, by asking the requested server to accept the data behind the load method, often used to submit the form. 3. http-response

There is a status code and status code description in the status line, example:

OK---client request succeeded

404 Not found--Request resource is not present

403 firbidden--server rejects received requests, denial of service

Basic knowledge of HTTP protocol

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.