Java daily side (Part1: computer network) [19 / 11 / 13]
•
Java
1.1 introduction to http
HTTP protocol, namely hypertext transfer protocol, belongs to the application layer protocol. It is a stateless application layer protocol based on request and response mode
1.2 main features
1.2. 1 support client / server mode (C / s)
1.2. 2 simple and fast
1.2. 3 flexible
1.2. 4 no connection:
Limit each connection to only one request. After the server receives the customer's request and receives a reply, it disconnects to save transmission time From 1, long connection is used by default, that is, the server needs to wait for a certain time before disconnecting to ensure the connection characteristics
1.2. 5 no status
1.3 request / corresponding steps
1. The client connects to the web server
2. Send HTTP request
3. The server receives the request and returns an HTTP response
4. Release TCP connection
5. The client browser parses HTML content
1.4 enter the URL in the browser address bar and press enter
1. DNS resolution
2. TCP connection (can be explained in combination with three handshakes)
3. Send HTTP request
4. The server processes the request and returns the HTTP message
5. The browser parses the rendered page
6. End of connection (4 waves)
1.5 common HTTP status codes
Five possible values
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码