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

边栏推荐
- ffmpeg+SDL2实现音频播放
- Est - il sûr d'ouvrir un compte d'actions maintenant via le lien d'ouverture de compte coiffé?
- Basic use of ActiveMQ in Message Oriented Middleware
- CVPR 2022 Oral 2D图像秒变逼真3D物体
- 417-二叉树的层序遍历1(102. 二叉树的层序遍历、107.二叉树的层次遍历 II、199.二叉树的右视图、637.二叉树的层平均值)
- FM信号、调制信号和载波
- MySQL简单权限管理
- Atlas conflict Remote Code Execution Vulnerability (cve-2022-26134 vulnerability analysis and protection
- 50 pieces of professional knowledge of Product Manager (IV) - from problem to ability improvement: amdgf model tool
- 使用Adobe Acrobat Pro调整PDF页面为统一大小
猜你喜欢

电子学:第012课——实验 11:光和声

Force buckle 272 Closest binary search tree value II recursion

allgero报错:Program has encountered a problem and must exit. The design will be saved as a .SAV file

Authority design of SaaS system based on RBAC

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

自制坡道,可是真的很香

Mr. Tang's lecture on operational amplifier (Lecture 7) -- Application of operational amplifier

Three Siemens fire-fighting hosts fc18 are equipped with can optical transceiver for optical fiber redundant ring network networking test

PH neutralization process modeling

电子学:第009课——实验 7:研究继电器
随机推荐
TCP 加速小记
电子学:第013课——实验 14:可穿戴的脉冲发光体
Electronics: Lesson 010 - Experiment 8: relay oscillator
深度学习系列45:图像恢复综述
网络模型——OSI模型与TCP/IP模型
挖掘微生物暗物质——新思路
[deep learning lightweight backbone] 2022 edgevits CVPR
Set the textalign property of the label control in C to control the method of text centering
Use the frame statistics function of the message and waveform recording analyzer royalscope to troubleshoot the accidental faults of the CAN bus
C examples of using colordialog to change text color and fontdialog to change text font
Buckle 78: subset
电子学:第014课——实验 15:防入侵报警器(第一部分)
三台西门子消防主机FC18配套CAN光端机进行光纤冗余环网组网测试
PHP array function Encyclopedia
静态网页服务器
Electronics: Lesson 014 - Experiment 15: intrusion alarm (Part I)
現在通過開戶經理發的開戶鏈接股票開戶安全嗎?
Functions should not specify operation types through variables
TCP的那点玩意儿
c#中设置lable控件的TextAlign属性控制文字居中的方法