Dan Boneh, recently of Stanford University, has written a proxy server
in Perl. The server can be used to quickly learn the http protocol as
it prints out all of the network transactions and replies from the server.
You can see exactly which http headers and methods are used
by the browser and server. For instance, the cookie mechanism can be easily
seen in action by observing the printouts.
To use the proxy server
Download the simple proxy server code by
clicking here. Save the file that appears making sure
you save it using .pl as the file extension. Next transfer
the file to your SCF account, aludra, using ASCII mode, not binary.
Run the proxy server. The proxy server requires a parameter,
a port number. You should use the number that was assigned to
you when you signed up on the course website. If you don't remember
the number, email the TA. To start the
server at port 8990 say proxy.pl 8990
Next start your browser and locate the field where proxies
can be set. Point your http proxy
server to the host on which the proxy server is running and the
appropriate port number, e.g. aludra.usc.edu 8990.
Now any network request sent by your browser will first go through
the proxy server and be printed out.
For a sample, issue the following URLs
In all cases notice the different HTTP requests and responses
that are involved.
a file with only text,
a file with text and one gif image,
a file with two frames containing simple1.htm and simple2.html
an executable script
a page that uses the POST method
a missing file
a secure directory
and finally exit proxy.pl and then try a reload in your browser and see that the proxy is
no longer working. You need to re-set your Edit | Preferences | Advanced | Proxies