Datasheet

<P>This is a placeholder page installed by the <A
HREF=”http://www.debian.org/”>Debian</A>
release of the <A HREF=”http://www.apache.org/”>Apache</A> web server package,
because no home page was installed on this host.
...
</BODY>
</HTML>
Connection closed by foreign host.
The telnet client is started with the name of the host to connect to and the port number (80):
telnet localhost 80
Once the client is connected, the server waits for a command. In this case, the client (our telnet session)
sends a block of commands, including the following:
The document to be retrieved and the protocol to return the document (
GET and HTTP 1.1)
The types of documents the client expects or can support (plain text or HTML text)
The host the request is destined for (typically the fully qualified domain name of the server)
The name of the user agent (browser) doing the requesting (
Telnet)
GET /index.html HTTP/1.1
Accept: text/plain,text/html
Host: localhost
User-Agent: Telnet
Note that only the first three pieces of data are necessary; the user agent name is provided only as a
courtesy to the Webmaster on the server as it gets recorded in the server logs accordingly.
This block of commands is known as the header and is required to be followed by a blank line, which
indicates to the server that the client is done with the header. The server then responds with information
of its own, including the following:
A response to the command
HTTP/1.1 200 OK
The current date (as known by the server)
Date: Sun, 17 Oct 2004 23:47:49 GMT
The server identification string, which usually identifies the type and capabilities of the server
but can be configured differently
Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2
6
Chapter 1
04_588206 ch01.qxd 6/30/05 12:36 AM Page 6