One: Introduction to HTTP
The HTTP protocol is an abbreviation for the Hyper Text Protocol (Hypertext Transfer Protocol) and is a transfer protocol for transmitting hypertext to a local browser from a World Wide Web server
HTTP is a TCP/IP communication protocol to transfer data (HTML files, image files, query results)
Two: How HTTP Works
The HTTP protocol works with the client-server architecture. The browser sends all requests to the HTTP server, the Web server, as an HTTP client through a URL.
The Web server has: Apache server, IIS server, etc...
The Web server sends a response message to the client, based on the received request.
The HTTP default port is 80 and can be changed to another port.
Attention:
1.http is no connection: the meaning of no connection is to limit the processing of only one request per connection. The server finishes processing the customer's request and receives the customer's answer, which is the disconnection. This way, the transfer time can be saved
2.http is media Independent: this means that as long as the client and the server know what to do with the data content, any type of data can be sent over HTTP, and the client and service side specify that the appropriate Mime-type content type be used
3.http is stateless: The HTTP protocol is a stateless protocol. Stateless means that the protocol has no memory capacity for transactional processing. A lack of state means that if the previous information is required for subsequent processing, it must be re-transmitted, which may cause every
The data volume of the secondary connection transfer fee increases. On the other hand, it responds faster when the server does not need the previous information
Three: HTTP communication flow
Web Browser <---------(HTTP protocol)------>http server<----------->cgi program<-------------> DataBase
HTTP Initial knowledge