Introduction to HTTP Protocol

xiaoxiao2021-03-06  105

The Internet is connected by each protocol, and we use the most widely used HTTP protocol now, that is, the hypertext transport protocol, different from the FTP (file transfer protocol), and because the HTTP protocol appears to be mainly used for hypertext transmission It's simpler. Today we will introduce the basic format of the HTTP protocol. Here, the HTTP protocol we talk is based on HTTP / 1.1, and use NET Vampire Pro 4.0 to obtain communication logs with the HTTP server, you can also use other HTTP download tools to get the communication log. In the HTTP protocol, the server refers to the part of the HTTP service, and the client refers to the browser or download tool you use. When communicating, a request connection is issued by the client, and the server is established; then, the client issues an HTTP request (Request), the server returns the response information (respond), thereby completing an HTTP operation.

Let's understand this process through an example: (The following is a connection, the following red font is the author) P 01-5-26 16:10:43 connect to go2.163.com ... // Connection Server P 01-5-26 16:10:44 Connected to Go2.163.com [61.129.65.148] // Analysis IP address, the following is HTTP operation S 01-5-26 16:10:44 Get / ~ minift /EPRETTY/PRETTY.ZIP HTTP / 1.1 // Request line, indicating that the file is used to get files, using the HTTP / 1.1 protocol // below is the request header (Request Head) S 01-5-26 16:10 : 44 Connection: Close / / Indicated connection S 01-5-26 16:10:44 host: go2.163.com // host name S 01-5-26 16:10:44 accept: * / * // Accepted Data Type S 01-5-26 16:10:44 pragma: no-cache // Parameters (compatible with the previous server) s 01-5-26 16:10:44 Cache-Control: no-cache // Do not use cache s 01-5-26 16:10:44 referer: http://go2.163.com/~minift/epretty // From this URL S 01-5-26 16:10:44 User-agent: mozilla / 4.04 [en] (Win95; I; NAV) // Client Identifier S 01-5-26 16:10:44 cookie: adid = ACDDAAAAAAAS 01-5-26 16:10:44 // The following is the response line, the server uses the HTTP / 1.0 protocol, the status code is 200, the status is OK, indicating that the file can be Reading R 01-5-26 16:10:47 Date: Sat, 26 May 2001 08:15:54 GMT // Today, Greenwich Time Expressed R 01-5-26 16:10:47 Server : Apache / 1.3.14 (UNIX) MOD_LAYOUT / 2.9.9 // Server Type R 01-5-26 16:10:47 Last-Modified: Fri, 04 May 2001 02:42:56 GMT // Final Update Time R 01-5-26 16:10:47 ETAG: "E614CF-37965-3AF21730"

转载请注明原文地址:https://www.9cbs.com/read-125516.html

New Post(0)