Briefly describe the process of HTTP Protocol Working Principles

Source: Internet
Author: User

How HTTP works is what we want to introduce to you now. As the basic HTTP protocol of WWW, its working principle can be divided into external and internal. Imagine how simple the protocol of a large network structure can be. Therefore, we must look at its workflow after learning about the basic structure of the HTTP protocol.

Now that we understand the composition of the URL, how does HTTP work? We will discuss this issue next.

An HTTP operation is called a transaction. The HTTP protocol can work in four steps:

First, the client and the server need to establish a connection. You only need to click a hyperlink to start HTTP.

After a connection is established, the client sends a request to the server in the format of Uniform Resource Identifier URL, Protocol version number, the MIME information is followed by the request modifier, client information, and possible content.

After receiving the request, the server sends a response in the format of a status line, including the Protocol version number of the message, a successful or wrong code, MIME information is followed by server information, entity information, and possible content.

The information returned by the client receiving server is displayed on the user's display screen through a browser, and the user's http workflow is disconnected from the server.

If an error occurs in one of the preceding steps, the error message is returned to the client and displayed. For users, these processes are completed by HTTP. Users only need to click and wait for the information to be displayed.

Many HTTP communications are initiated by a user proxy and include a request to request resources on the source server. The simplest case may be that a separate connection is established between the user proxy and the server. On the Internet, HTTP Communication usually occurs over TCP/IP connections. The default port is TCP 80, but other ports are also available. However, this does not indicate that the HTTP protocol can be completed over the Internet or other network protocols. HTTP only indicates a reliable transmission.

In this process, we can call the seller to tell him what type of products we need, and then tell us what products are available and what products are out of stock. In this case, we call HTTP over a telephone line through TCP/IP). Of course, we can also fax as long as there is a fax from the seller.

The above briefly introduces the macro operation mode of the HTTP protocol. The following describes the internal operation process of the HTTP protocol working principle.

In WWW, "customer" is a relative concept with "server". It only exists in a specific connection period, that is, the customer in a connection may act as a server in another connection. The HTTP-based Client/Server mode information exchange process consists of four processes: establishing a connection, sending request information, sending response information, and closing a connection. This is like the above example, the whole process of telephone order.

Simply put, in addition to HTML files, any server also has an HTTP resident program to respond to user requests. Your browser is an HTTP client and sends a request to the server. When a starting file is entered in the browser or a hyperlink is clicked, the browser sends an HTTP request to the server, this request is sent to the URL specified by the IP address. The resident program receives the request and sends the requested file back after necessary operations. In this process, the data sent and received on the network has been divided into one or more data packets packet), each data packet includes: data to be transmitted; control information, it tells the network how to process data packets. TCP/IP determines the format of each data packet. If you don't tell you in advance, you may not know that the information is divided into many small pieces for transmission and re-combination.

That is to say, in addition to commodities, a seller also has an employee answering your call. When you call, your voice is converted into various complicated data, when the telephone lines are transmitted to the other party's phone, the other party's phone converts various complicated data into sound, so that the staff of the other party's seller can understand your request. In this process, you do not need to understand how sound is converted into complex data. The entire process of working principles of the HTTP protocol has been completed.

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.