Chapter III: HTTP messages in HTTP messages
The 1.HTTP communication process is the request message sent from the client to the server and the response message from the server to return the client .
The 2.HTTP message is a string literal that is used for HTTP protocol information interaction.
3.HTTP Message structure:
first, the message header ;
①, request line (in Request message): Contains request method , request URI,http version , or status line (in response message): Contains HTTP version , response result status code , reason phrases ;
②, header field
two, empty line (CR+LF);
third, the entity body (optional).
The 6.HTTP message body is the entire message itself , and the entity body is the content of the request or response (the entity body can be encoded or compressed)
7. Chunked transfer encoding: The entity body is divided into multiple blocks , received and decoded by the client (browser), so that the browser gradually display the page .
8. Content negotiation mechanism: Depending on the header field in the request message , the server side returns the most appropriate resource , such as the English or Chinese version of the page, back to the PC page or mobile version of the page.
"Graphic http" chapter III reading notes