Testing our Web site

Now we can connect to www.acme.com and fetch whatever servlets it has.

Actually, we don't really own acme.com, so we can't get to it by host name, and the HTTP service does need to respond to the host name rather than the IP address since, like any good Web server, it expects to run several domains under the same IP address. So the following test is with telnet by IP address, using the Host: header to force the right response:


% telnet victoria.intranet.hyperlink.com 80
Trying 10.119.8.139...
Connected to victoria.intranet.hyperlink.com.
Escape character is '^]'.
GET /examples/servlets/index.html HTTP/1.0
Host: www.acme.com

HTTP/1.1 200 OK
Content-type: text/html
Content-length: 4516
Last-modified: Wed, 05 Dec 2001 11:36:36 GMT

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   ....
Connection closed by foreign host.
% 

Notice we the document we fetch is prefixed /examples, as we specified above to Webtrix. The server's copious HTML response is truncated.

Of course, if our workstation was really using our new DNS service, then we could have accessed the site via any Web browser.

Nik Silver 2002-03-09