In the graduation season, finding a job has repeatedly hit a wall, so I have to calm down and review and consolidate my previous knowledge.
http protocol:
1 Introduction:
HTTP (Hyper Text Transfer Protocol) is an application layer protocol composed of requests and responses. It is a standard client service model. HTTP is a stateless protocol.
HTTP |
TCP |
IP |
data link layer |
2. Http request response mode
The http protocol is always just the client sending the request and the server sending the response back. This restricts the use of the http protocol, and the server cannot push messages to the client when the client does not send a request.
The http protocol is a stateless protocol, and this request from the same client has no correspondence with the previous request.
3. Workflow
An http operation is called a thing, and its working process can be divided into four steps:
1) First, the client establishes a connection with the server. As long as there is a hyperlink on a single machine, the work of http starts
2) After the connection is established, the client sends a request to the server. The format of the request is a status line, including the protocol version number of the information, a success or error code, followed by MIME information including server information, entity information and possible content.
3) After the server receives the request, it gives the corresponding response information in the form of a status line, including the protocol version number of the information, a successful or error code, followed by MIME information and information including the server, entity information and possible Content.
4) The client receives the information returned by the server and has been displayed on the user's display screen through the browser, and then the client is disconnected from the server.