52ky 发表于 2022-4-26 19:23:29

HTTP报文是什么样子的?.pdf

上一讲我们在机器最小化的环境下做了两次HTTP协议的实验,用Wireshark抓包,搞清楚了HTTP协议的基本工作流程,即“request-response”“一发一发”接收“”模式。
可见HTTP的工作方式非常简单。由于底层的具体传输工作由 TCP/IP 协议负责,所以 HTTP 协议在这方面基本不用太担心。单从这一点来看,所谓的“超文本传输??协议”根本不在乎“传输”,有点“名不副实”。
那么HTTP协议的核心部分是什么?
答案是它传输的消息的内容。
HTTP协议在规范文档中详细定义了消息的格式,指定了组件、解析规则和处理策略,因此可以在TCP/IP层实现更灵活丰富的功能,如连接控制、缓存管理、数据编码、内容协商等

(Last time, we did two experiments of HTTP protocol in the environment of machine minimization, captured packets with Wireshark, and figured out the basic workflow of HTTP protocol, that is, "request response", "one send and one receive" mode.HTTP works in a very simple way. Since the specific transmission work of the bottom layer is in the charge of TCP / IP protocol, HTTP protocol basically doesn't need to worry too much in this regard. From this point of view alone, the so-called "hypertext transmission protocol" doesn't care about "transmission" at all, which is a bit "untrue".So what is the core of HTTP protocol?The answer is the content of the message it transmits.HTTP protocol defines the message format in detail in the specification document, and specifies the components, parsing rules and processing strategies. Therefore, it can realize more flexible and rich functions in TCP / IP layer, such as connection control, cache management, data coding, content negotiation, etc)









页: [1]
查看完整版本: HTTP报文是什么样子的?.pdf