1、Web服务基础
1、1用户访问网站的基本流程:

1、2DNS解析基本流程:


2、HTTP协议:
1)超文本传输协议,互联网最常用的一种协议。
2)HTTP重要应用之一是WWW服务。
3)设计的最初目的就是提供一种发布和接收HTML页面的方法。
4)HTTP协议的WWW服务应用的默认端口号为80,另外一个加密的WWW服务应用https的默认端口号是443。
5)1.0版本:游览器与服务器只能保持短暂的连接,每次请求都需建立TCP连接,服务完成后立马断开。
6)1.1版本:支持持久连接,一个TCP连接上可以传送多个HTTP请求,比1.0增加了更多的请求头和响应头信息。
3、HTTP请求方法

4、HTTP状态码
用来表示Web服务器相应HTTP请求状态的数字代码。(只能3位数)

5、生产场景中常见的状态码

6、HTTP报文
有ASCII码串组成,但各个字段长度不同。分为请求报文和响应报文,二者格式类似
6、1请求报文:

6、2响应报文

网友评论