当前位置:网站首页>静态网页服务器
静态网页服务器
2022-06-25 06:43:00 【mfy的1号小迷弟】
这里写自定义目录标题
1.HTTP协议简介
- HTTP协议定义Web客户端如何从Web服务器请求Web页面,以及服务器如何把Web页面传送给客户端。
- HTTP协议采用了请求/响应模型。
- 客户端向服务器发送一个请求报文,请求报文包含请求的方法、URL、协议版本、请求头部和请求数据。
- 服务器以一个状态行作为响应,响应的内容包括协议的版本、成功或者错误代码、服务器信息、响应头部和响应数据。
1.1 HTTP请求/响应的步骤
客户端连接到Web服务器
一个HTTP客户端,通常是浏览器,与Web服务器的HTTP端口(默认80)建立一个TCP套接字连接发送HTTP请求
通过TCP套接字,客户端向Web服务器发送一个文本的请求报文,一个请求报文由请求行,请求头部,空行和请求数据4部分组成。服务器接受请求并返回HTTP响应
Web服务器解析请求,定位请求资源。服务器将资源复本写到TCP套接字,由客户端读取。一个响应由状态行,响应头部,空行和数据4部分组成释放连接TCP连接
若connection模式为close,则服务器主动关闭TCP连接,客户端被动关闭连接,释放TCP连接;若connection模式为keepalive,则该连接会保持一段时间,在该时间内可以继续接收请求;客户端浏览器解析HTML内容
客户端浏览器首先解析状态行,查看表明请求是否成功的状态代码。然后解析每一个响应头,响应头告知以下为若干字节的HTML文档和文档的字符集。客户端浏览器读取响应数据HTML,根据HTML的语法对其进行格式化,并在浏览器窗口中显示。
1.2 响应状态码

边栏推荐
- Usememo simulation usecallback
- Invalid Navicat scheduled task
- 50. Pow(x, n)-快速幂
- 一文了解 | 革兰氏阳性和阴性菌区别,致病差异,针对用药
- MySQL simple permission management
- Tips 𞓜 how to clean PCB boards 2021-10-22
- Advantages and differences of three kinds of vias in PCB 2021-10-27
- C get the version number of exe - file version and assembly version
- php入门基础记录
- STL tutorial 4- input / output stream and object serialization
猜你喜欢

El input to add words to the tail

差点被这波Handler 面试连环炮带走~

搞清信息化是什么,让企业转型升级走上正确的道路

How much do you know about electronic components on PCB?

权限、认证系统相关名词概念

使用Adobe Acrobat Pro调整PDF页面为统一大小

"Spatial transformation" significantly improves the quality of ground point extraction of cliff point cloud

基于RBAC 的SAAS系统权限设计

【论文学习】《VQMIVC》

The method of judging whether triode can amplify AC signal
随机推荐
C# 读取web上的xml
Importer des données dans MATLAB
基于RBAC 的SAAS系统权限设计
Cifar-10 dataset application: quick start data enhancement method mixup significantly improves image recognition accuracy
OpenCV每日函数 结构分析和形状描述符(8) fitLine函数 拟合直线
Requirements for Power PCB circuit board design 2021-11-09
Manufacturing process of PCB 2021-10-11
Lebel only wants an asterisk in front of it, but doesn't want to verify it
Usememo simulation usecallback
Function template_ Class template
Five causes of PCB board deformation and six solutions 2021-10-08
力扣76题,最小覆盖字串
Machine learning notes linear regression of time series
Atlas conflict Remote Code Execution Vulnerability (cve-2022-26134 vulnerability analysis and protection
Analysis of kinsing dual platform mining family virus
Take you through the normalization flow of GaN
[single chip microcomputer project training] multipoint temperature wireless acquisition system based on nRF905
VSCode很好,但我以后不会再用了
Six causes of PCB disconnection 2021-10-20
NSIS silent installation vs2013 runtime