HTTP protocol hyper text Transfer Protocol (HTTP) is a WWW browser (client), and the application layer communication protocol between the servers. HTTP is a quick and utility protocol for distributed collaborative hypermedia information systems, which is a universal, stateless, object-oriented protocol. WWW is based on hyper text. Hypertext is an open reading information, which can be read according to the reader's preferences. HTTP specifies the WWW client / server mode, and any HTTP session in this mode of operation (transaction) includes four steps, as shown below
Just click on a hyperlink, HTTP's work begins. The WWW client establishes a connection with the WWW server via HTTP. After the connection is established, the client issues a request to serve or require information, and some address information and supplementary information are passed to the server. Service processing request, returning the requested information or returns a response indicating that the request cannot be replied, including information, information and services that affect the customer, and some recording status. The client receiving the client receiving the response information returned by the server and displayed on the display via the browser, and the client and server are automatically turned off. If an error occurs in the above process, the error message is generated returning to the client by the display. But for the user, these processes are completed by http, and the user is only clicked with the mouse, and then waits for information to output to the user's display. The HTTP protocol is based on TCP / IP protocol, which not only needs to ensure proper transfer of super text documents, but also be able to determine which part of the document is transmitted, and which part of the content is first displayed. Other WWW services, such as FTP, Telnet, and Gopher must also take advantage of the HTTP. The session between HTTP servers and HTTP clients is as follows: 1 The client establishes link with the server to establish a connection with the socket, so you want to specify the machine name , Resource names and breakage can be provided by URLs. The format of the URL is: http: //
User-Agent: About the requesting Customer Information 3 Server receives a request for the request to make a reply server, explain the method used in the request, and starts processing a response. The server's response message also contains message information in the form of the header field. . The first line of the message is the state line, the format is the