This article mainly describes some basic HTTP-related concepts and basic knowledge, mainly for beginners like me, the knowledge is mainly from the "Http authoritative guide"
In addition to sharing these basic knowledge, the author also for the future to find work review. (The agreement is the agreement, it's there)
How does the Web client communicate with the server? Where does the resource come from? How does a WEB transaction work? What is the message format used for Http communication? What is the underlying TCP network transmission? Directory HTTP-Multimedia messenger of the Internet Web client and server resource transaction messages The fabric component of the Web Connection Body HTTP-Multimedia messenger for the Internet
What is the HTTP protocol? What does it do?
A protocol is an agreement between a group of people or a large group of people (an organization) to exchange information that is mutually acceptable.
The HTTP protocol is an application-layer protocol that uses a reliable data Transfer protocol. Enables application developers to focus on application-specific technical details.
WEB Client and server
The client sends an HTTP request, and the server echoes the requested data in the HTTP response. (HTTP client and HTTP server constitute the basic components of the World Wide Web)
Resources
A Web server is the host of a Web resource.
Resources are divided into static resources (files, pictures, animations, movies and other media resources) and dynamic resources (software programs that dynamically generate content as needed)
Transaction
An HTTP transaction consists of a request command (sent from the client to the server) and a response from the server to the client.
This communication is done through the formatted data block of the HTTP message.
An HTTP request tells the server what to do with the HTTP method (get a page, a gateway program, delete a file, etc.)
The HTTP response tells the client whether the request was successful through an HTTP status code, or whether additional actions are required.
Message
An Http message is made up of a simple string of rows.
The message consists of three parts: Starting line, header, body
Format of Request message:
< Method > < Request-url > < version > < Headers > //row blank line < Entity-body >
format of the response message:
< version > < Status > < Reason-phase > < Headers > //row blank line < Entity-body >
Connection
Http is only the application layer protocol, and the bottom layer is given a universal, reliable Internet Protocol TCP/IP.
Before an HTTP client sends a message to the server, it needs to establish a TCP/IP connection between the client and the server by using a port number.
Structure component proxy for the WEB
An HTTP intermediate entity located between the client and the server.
is an important component of web security, application integration, and performance optimization.
Cache
A special HTTP proxy server that allows copies of frequently used pages to be kept closer to the client.
Gateway
is a special server that is used as an intermediary entity for other servers. Typically used to convert HTTP traffic to other protocols.
The gateway receives the request as if it were the source-side server for the resource.
Tunnel
After the tunnel is established, the HTTP application will blind forward the original data between the two links.
A common use is to host encrypted Secure Sockets Layer traffic over an HTTP connection.
HTTP protocol Overview