当前位置:网站首页>Static web server
Static web server
2022-06-25 08:05:00 【Mfy's little brother 1】
Here is the custom directory title
1.HTTP Protocol Brief
- HTTP Protocol definition Web How the client from Web Server request Web page , And how the server puts Web Page to client .
- HTTP The protocol takes the request / Response model .
- The client sends a request message to the server , The request message contains the method of the request 、URL、 Protocol version 、 Request headers and request data .
- The server responds with a status line , The response includes the version of the protocol 、 Success or error code 、 server information 、 Response headers and response data .
1.1 HTTP request / Response steps
The client connects to Web The server
One HTTP client , Usually a browser , And Web Server's HTTP port ( Default 80) Build a TCP socket connectionsend out HTTP request
adopt TCP Socket , Client to Web The server sends a text request message , A request message is sent by the request line , Request header , Blank lines and request data 4 Part of it is made up of .The server accepts the request and returns HTTP Respond to
Web The server parses the request , Locate request resources . The server writes the resource copy to TCP Socket , Read by client . A response is made by the status line , Response head , Blank lines and data 4 Part of it is made up ofRelease the connection TCP Connect
if connection The model is close, Then the server shuts down TCP Connect , The client passively closes the connection , Release TCP Connect ; if connection The model is keepalive, Then the connection will remain for a period of time , Can continue to receive requests during this time ;Client browser parsing HTML Content
The client browser first parses the status line , Check the status code that indicates whether the request was successful . Then parse each response header , The response header tells you that there are several bytes of HTML Documents and character sets of documents . The client browser reads the response data HTML, according to HTML It's formatted with the syntax of , And display... In the browser window .
1.2 Response status code

边栏推荐
- [Video] ffplay uses MJPEG format to play USB camera
- Luogu p5994 [pa2014]kuglarz (XOR thinking +mst)
- 函数尽量不要通过变量指定操作类型
- Linux上oracle和mysql的启动,关闭,重启
- CAN透传云网关CANIOT,CANDTU记录CAN报文远程收发CAN数据
- 【Unexpected token o in JSON at position 1出错原因及解决方法】
- 【补题】2021牛客暑期多校训练营9-n
- C disk drives, folders and file operations
- 剑指offer刷题(简单等级)
- Application of can optical transceiver of ring network redundant can/ optical fiber converter in fire alarm system
猜你喜欢

To understand the difference between Gram-positive and Gram-negative bacteria and the difference in pathogenicity

Importer des données dans MATLAB

深度学习系列45:图像恢复综述

Can transparent cloud gateway caniot and candtu record can messages and send and receive can data remotely

c#搭建ftp服务器并实现文件上传和下载

Can bus working condition and signal quality "physical examination"

剑指offer刷题(中等等级)

50 pieces of professional knowledge of Product Manager (IV) - from problem to ability improvement: amdgf model tool

Solving some interesting problems with recurrence of function

基于Anaconda的模块安装与注意事项
随机推荐
牛客:飞行路线(分层图+最短路)
2021ICPC网络赛第一场
Technology blog | how to communicate using SSE
1464. maximum product of two elements in an array
Luogu p3313 [sdoi2014] travel (tree chain + edge weight transfer point weight)
TCP MIN_RTO 辩证考
数论模板啊
Electronics: Lesson 012 - Experiment 13: barbecue LED
FM signal, modulated signal and carrier
线程+线程问题记录
c#搭建ftp服务器并实现文件上传和下载
php数组函数大全
MySQL simple permission management
使用Adobe Acrobat Pro调整PDF页面为统一大小
Luogu p2048 [noi2010] super Piano (rmq+ priority queue)
不怕百战失利,就怕灰心丧气
电子学:第012课——实验 13:烧烤 LED
Electronics: Lesson 010 - Experiment 9: time and capacitors
环网冗余式CAN/光纤转换器的CAN光端机在消防火灾联网报警系统中的应用
CAN透传云网关CANIOT,CANDTU记录CAN报文远程收发CAN数据