当前位置:网站首页>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

边栏推荐
- Electronics: Lesson 010 - Experiment 8: relay oscillator
- Authority design of SaaS system based on RBAC
- [Video] ffplay uses MJPEG format to play USB camera
- Is it safe to open an account through the haircut account opening link now?
- Can transparent cloud gateway caniot and candtu record can messages and send and receive can data remotely
- CAN透传云网关CANIOT,CANDTU记录CAN报文远程收发CAN数据
- Not afraid of losing a hundred battles, but afraid of losing heart
- Apache CouchDB 代码执行漏洞(CVE-2022-24706 )批量POC
- 使用Adobe Acrobat Pro调整PDF页面为统一大小
- FM信号、调制信号和载波
猜你喜欢

Allgero reports an error: program has encoded a problem and must exit The design will be saved as a . SAV file

Ubuntu18下登录mysql 5.7设置root密码

Electronics: Lesson 012 - Experiment 11: light and sound

自制坡道,可是真的很香

Importer des données dans MATLAB

CAN总线工作状况和信号质量“体检”

使用报文和波形记录分析仪RoyalScope的帧统计功能排查CAN总线偶发性故障

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

Technology blog | how to communicate using SSE

Matlab代码格式一键美化神器
随机推荐
FM信号、调制信号和载波
Electronics: Lesson 014 - Experiment 15: intrusion alarm (Part I)
Can transparent cloud gateway caniot and candtu record can messages and send and receive can data remotely
Allgero reports an error: program has encoded a problem and must exit The design will be saved as a . SAV file
Three Siemens fire-fighting hosts fc18 are equipped with can optical transceiver for optical fiber redundant ring network networking test
[daily training] 207 Class Schedule Card
How to resize an image in C #
Application of can optical transceiver of ring network redundant can/ optical fiber converter in fire alarm system
电子学:第009课——实验 7:研究继电器
Analysis and utilization of Microsoft Office Word remote command execution vulnerability (cve-2022-30190)
2265. number of nodes with statistical value equal to the average value of subtree
Electronics: Lesson 008 - Experiment 6: very simple switches
將數據導入到MATLAB
Anaconda based module installation and precautions
C # set up FTP server and realize file uploading and downloading
Niuke: flight route (layered map + shortest path)
洛谷P2486 [SDOI2011]染色(树链+线段树 + 树上区间合并 )
数论模板啊
WebSocket的理解以及应用场景
[supplementary question] 2021 Niuke summer multi school training camp 4-N