PHP

Hypertext Transfer Protocol

As discussed in Chapter 1, HTTP is the standard that allows documents to be communicated and shared over the Web. From a network perspective, HTTP is an application-layer protocol that is built on top of TCP/IP. Using our courier analogy from the previous section, HTTP is a kind of cover letter-like a fax cover sheet-that is stored in the envelope and tells the receiver what language the document is in, instructions on how to read the letter, and how to reply.

Since the original version, HTTP/0.9, there have only been two revisions of the HTTP standard. HTTP/1.0 was released as RFC-1945[A] in May 1996 and HTTP/1.1 as RFC-2616 in June 1999.

[A] Request for Comments, or RFCs, are submitted to the RFC editor (http://www.rfc-editor.org) usually by authors attached to organizations such as the Internet Engineering Task Force (IETF at http://www.ietf.org). RFCs date back to the early ARPAnet days and are used to present networking protocols, procedures, programs, and concepts. They also include meeting notes, opinions, bad poems, and other humor: RFC-2324 describes the Hypertext Coffee Pot Control Protocol.

Request and Response Model

HTTP is simple: a client-most conspicuously a web browser-sends a request for some resource to a HTTP server, and the server sends back a response. The HTTP response carries the resource-the HTML document or image or whatever-as its payload back to the client. This simple request-response model is shown in Figure B-2.

Figure B-2. Browser makes a request and the HTTP server responds
figs/wda_ab02.gif

The term HTTP server is the correct description for what is more commonly called a web server. Technically, a web browser is an example of a user agent. Other user agents include proxy servers, applications that can provide services such as caching of responses, and access control.