What
"The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems."[10]
"HTTP is a stateless request/response protocol that operates by exchanging messages across a reliable transport- or session-layer 'connection' "[10]
"A HTTP client is a program that extabilishes a connection to a server for purpose of sending one or more HTTP requests."[10]
"A HTTP server is a program that accepts connections in order to service HTTP requests by sending HTTP responses." [10]
"The terms 'client' and 'server' refer only to roles that these programs perform for a particular connection" [10]
How
"Most HTTP Communication consists of a retrieval request (GET) for a representation of some resource identified by a URI."
"HTTP relies upon the Uniform Resource Identifier (URI) standard to indicate the target resource and relationships between resources." [10]
"Messages are passed in a format similar to that used by Internet mail and the Multipurpose Internet Mail Extensions (MIME)"
"The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems."[10]
"The HTTP protocol is a request/response protocol. A client sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content over a connection with a server. The server responds with a status line, including the message's protocol version and a success or error code, followed by a MIME-like message containing server information, entity metainformation, and possible entity-body content."[10]
"A client sends an HTTP request to a server in the form of a request message, beginning with a request-line that includes a method, URI, and protocol version, followed b header fields containning request modifiers, client information, and reqpresentation metata, an empty line to indicate the end of the header section, and finally a message body containing the payload body." [10]
"A server responds to a client’s request by sending one or more HTTP response messages, each beginning with a status line that includes the protocol version, a success or error code, and textual reason phrase , possibly followed by header fields containing server information, resource metadata, and representation metadata, an empty line to indicate the end of the header section, and finally a message body containing the payload body. " [10]
An Example[10]:
Client request:
GET /hello.txt HTTP/1.1 User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 Host: www.example.com Accept-Language: en, mi
Server response:
HTTP/1.1 200 OK Date: Mon, 27 Jul 2009 12:28:53 GMT Server: Apache Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT ETag: "34aa387-d-1568eb00" Accept-Ranges: bytes Content-Length: 51 Vary: Accept-Encoding Content-Type: text/plain Hello World! My payload includes a trailing CRLF.
Request
"A request message from a client to a server includes, within the first line of that message, the method to be applied to the resource, the identifier of the resource, and the protocol version in use."[10]
Request = Request-Line ; Section 5.1
*(( general-header ; Section 4.5
| request-header ; Section 5.3
| entity-header ) CRLF) ; Section 7.1
CRLF
[ message-body ] ; Section 4.3
Request-Line(请求行)[10]
"The Request-Line be