The Hypertext Transfer Protocol (HTTP) is an application-level protocol with the lightness and speed necessary for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World-Wide Web global information initiative since 1990.
HTTP allows an open-ended set of methods to be used to indicate the purpose of a request. It builds on the discipline of reference provided by the Uniform Resource Identifier (URI), as a location (URL) or name (URN), for indicating the resource on which a method is to be applied. Messages are passed in a format similar to that used by Internet Mail and the Multipurpose Internet Mail Extensions (MIME).
HTTP is also used as a generic protocol for communication between user agents and proxies/gateways to other Internet protocols, such as SMTP, NNTP, FTP, Gopher, and WAIS, allowing basic hypermedia access to resources available from diverse applications and simplifying the implementation of user agents.
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 meta information, and possible entity-body content.
The first version of HTTP, referred to as HTTP/0.9, was a simple protocol for raw data transfer across the Internet. HTTP/1.0, as defined by RFC 1945, improved the protocol by allowing messages to be in the format of MIME-like messages, containing meta information about the data transferred and modifiers on the request/response semantics. However, HTTP/1.0 does not sufficiently take into consideration the effects of hierarchical proxies, caching, the need for persistent connections, or virtual hosts. "HTTP/1.1" includes more stringent requirements than HTTP/1.0 in order to ensure reliable implementation of its features. There is a Secure HTTP specification, which will be discussed in separate document.
Protocol Structure
HTTP messages consist of requests from client to server and responses from server to client.
The request message has the following format:
| Request Line | General header | Request header | Entity header | Message Body |
The Request-Line begins with a method token, followed by the Request-URI and the protocol version, and ending with CRLF. The elements are separated by SP characters. No CR or LF is allowed except in the final CRLF sequence. The details of the general header, request header and entity header could be found in the reference documents.
The response message has the following format:
| Status Line | General header | Response header | Entity header | Message Body |
The Status-Code element is a 3-digit integer result code of the attempt to understand and satisfy the request. The Reason-Phrase is intended to give a short textual description of the Status-Code. The Status-Code is intended for use by automata and the Reason-Phrase is intended for the human user. The client is not required to examine or display the Reason-Phrase. The details of the general header, response header and entity header could be found in the reference documents.
Related Terms: TCP, TELNET, FTP, SMTP, NNTP, Gopher, WAIS, DNS, S-HTTP
Sponsor Source: HTTP is defined by IETF (http://www.ietf.org) RFC1945 and 2616.
Reference:
http://www.javvin.com/protocol/rfc1945.pdf : Hypertext Transfer Protocol -- HTTP/1.0
http://www.javvin.com/protocol/rfc2616.pdf : Hypertext Transfer Protocol -- HTTP/1.1
