Computer Networks

Practical Exercises #6

  1. Repeat the first Practical Exercise using HTTP/1.0. Recall from the lecture that you have to add a protocol specifier onto the GET request line, as in:
        GET /home/index.html HTTP/1.0
    
    Notice that you have to hit the RETURN key twice before you see the HTML. If you can scroll backwards to the HTTP/1.0 command you gave, you'll see the HTTP/1.0 "Response Headers". Have a look though them, noting the Content-length: , Content-type: and the various date-related headers.

  2. If you're using Netscape, have a look at the "Page Info" for this (or any other) Web page -- it's under the "View" menu. It shows most of the information supplied in the HTTP/1.0 Response Headers.

  3. It's interesting to try out the Proxy Server features of HTTP -- in fact, these were present in HTTP/1.0 "as implemented", although I don't think they were in the standard - correct me if I'm wrong. In this case, you'll have to telnet to your local proxy server. Within La Trobe Uni, you do this by telnet proxy.latrobe.edu.au 8080. Once connected, the GET command is the same as usual except you request a full URL, eg:
    GET http://www.unimelb.edu.au HTTP/1.0<newline><newline>
    
    In fact, from within La Trobe this is the only way you can access Web pages outside the university. Can you tell if the page you fetch was cached at the proxy server?

  4. If you've got some Web pages on ironbark, you might be interested to have a look at the HTTP server logs to see who's been looking at them. The files are /usr/local/etc/httpd/ironbark/logs/access_log , /usr/local/etc/httpd/ironbark/logs/referer_log and /usr/local/etc/httpd/ironbark/logs/agent_log . These files are usually huge, so the easy way to look at your own stuff is to use the Unix grep utility to extract the lines you're interested in. For example, I use the following to see who's reading my (pscott's) Web pages:
    grep -v latrobe /usr/local/etc/httpd/ironbark/logs/access_log | grep pscott | less +G
    
    A few words of explanation: the grep -v latrobe only selects records (ie, lines) which don't contain the string "latrobe" -- I'm interested in accesses from outside La Trobe. The result of this is piped into a second grep which selects only those lines containing the string "pscott", as all references to my Web pages do.

    You can copy-and-paste this command into a text file on Unix, run chmod a+x on the file to make it executable, and use it as a command to check your own logs -- changing "pscott" to your own username, naturally. You can do similar things with the referrer_log file. The agent_log file is a bit different -- it simply lists the browser ID for each access. It's still worth a look.

  5. Useful Web links:
    Web Reference has some useful information on HTTP, as well as lots of other stuff.
    Also: BrowserWatch has lots of useful and up-to-date information about very Web browser you could name.
    Netcraft have a great on-line database of who's running which Web server. Check out your fave Web sites!


This set of practical exercises accompanies Tutorial #6.
La Trobe Uni Logo [Previous Practical] [Tutorial Index] [Next Practical]
Copyright © 2000 by Phil Scott, La Trobe University.
Valid HTML 3.2!