|
|||||||||
|
The Hypertext Transfer ProtocolThe Hypertext Transfer Protocol (HTTP) is a simple protocol that describes the mechanism whereby Web clients talk to servers. The basic model is that the client sends a request to the server and receives a response back. The first line of a request consists of a method, an identifier for the object requested and an optional HTTP version identifier, for example:
GET /Welcome.html HTTP/1.0 If the version identifier is omitted, version 0.9 is assumed and the request just consists of the single line, otherwise the request is followed by further information expressed as mail-type headers and terminated by a blank line. All of this information is encoded using seven-bit US-ASCII. Following the request there may be an object (such as data from a form), encoded as specified by MIME headers. The server's response consists of a status line followed by a set of headers. The status line contains the protocol version that the server is using, followed by a numeric status code and a textual representation of the status code, as shown below:
HTTP/1.0 200 Document follows MIME-Version: 1.0 Server: CERN/3.0 Date: Monday, 14-Nov-94 17:12:29 GMT Content-Type: text/html Content-Length: 47 Last-Modified: Saturday, 01-Oct-94 16:41:56 GMT Browsers actually send a lot more information to servers than has been outlined above, detailed knowledge of which is not strictly necessary for running a server. This information is currently being codified by an IETF working group, and the new HTTP specification is expected as an RFC sometime soon.
Next: Web server components Up: Web server concepts Previous: The MIME Standard
Spinning the Web by Andrew Ford |
||||||
Copyright © 1996-2002 Ford & Mason Ltd |