1、基本概念
1.1 HTTP
1.1.1 HTTP(HyperText Transfer Protocol:超文本传输协议)的基本概念
① HTTP是一种用于分布式、协作式和超媒体信息系统的应用层协议。 简单来说就是一种发布和接收 HTML 页面的方法,被用于在 Web 浏览器和网站服务器之间传递信息。
② HTTP 默认工作在 TCP 协议 80 端口,用户访问网站 http:// 打头的都是标准 HTTP 服务。
③ HTTP 协议以明文方式发送内容,不提供任何方式的数据加密,如果攻击者截取了Web浏览器和网站服务器之间的传输报文,就可以直接读懂其中的信息,因此,HTTP协议不适合传输一些敏感信息,比如:信用卡号、密码等支付信息。
1.1.2 What is HTTP?
① HTTP (Hypertext Transfer Protocol) is the foundation of any data exchange on the World Wide Web. It provides a set of rules and standards that control how any information can transfer on the World Wide Web.
(HTTP(超文本传输协议)是万维网上任何数据交换的基础。它提供了一套规则和标准来控制任何信息如何在万维网上传输。)
② HTTP is an application layer protocol in the Internet protocol suite model (TCP/IP). It is a client-server protocol that enables web browsers and web servers to communicate. When a user makes an HTTP request on the browser, the server sends the requested data to the user in the form of web pages.
(HTTP 是 Internet 协议套件模型 (TCP/IP) 中的应用层协议。它是一种客户端-服务器协议,使 Web 浏览器和 Web 服务器能够进行通信。当用户在浏览器上发出 HTTP 请求时,服务器将请求的数据以网页的形式发送给用户。)
③HTTP is a stateless protocol. It means that every transaction will be executed separately. On completion of a transaction between the web browser and the server, the connection gets lost.
(HTTP 是一种无状态协议。这意味着每笔交易都将单独执行。Web 浏览器和服务器之间的事务完成后,连接就会丢失。)
1.1.3 HTTP Request/Response
Here is how the communication between clients and servers takes place with HTTP requests and responses:
以下是客户端和服务器之间通过 HTTP 请求和响应进行通信的方式:
● The client (browser) sends an HTTP request to the web
客户端(浏览器)向 Web 发送 HTTP 请求
● A web server will receive the request
Web 服务器将接收请求
● The webserver will run an application to process