OS Options: Must run on CSEE shell servers
- Proxy Web Server: Write a web proxy server.
This part requires multiple pieces to be done so I suggest
working on each part separately and verifying that each part works by itself. These parts are:
- A [15 points]: Construct a routine or object to parse an HTTP 1.0 request to
determine the URL. You may not rely on any intrinsic language
objects that do HTTP parsing for you.
- B [25 points]: Construct a routine or object to parse a given URL string in the form
http://hostname[:portnum]/pathname, where the part in
[] is optional, into (1) host IP address, (2) port, and (3) URI.
You may not rely on any intrinsic language objects that do URL parsing for you.
- C [30 points]: Construct a routine that uses the routine or object above
to take a URL, connect to the correct web server, send a HTTP/1.0 GET request, and
retrieve the response. You may not rely on any intrinsic language objects that
do HTTP retrieval for you.
- D [30 points]: Take the routines or objects constructed in the parts above
and construct an application that listens on a TCP port given on the command line,
accepts client connections, receives client HTTP requests,
parses HTTP requests, connects to and retrieves the object for the web client, and returns
the object to the web client as an HTTP proxy would.
Errors must be handled for hostnames that can not be looked up, for failed connection
to web servers, and for request methods other than GET (i.e. returning 501 Not Implemented).
Notes:
Your submissions must at least compile before any credit will be given.
Submissions that do not compile will not be graded. Submissions submitted
after the due date will not be graded. All work must be your own original work.
To get partial credit for parts of the assignment, you must demonstrate that
those pieces work by themselves.
If you share code with others, you will be given a 0 for the assignment. This
assignment set is worth 16% of your total grade.
- HTTP 1.0 Specification at
http://www.w3.org/pub/WWW/Protocols/HTTP/1.0/spec.html
Todd L. Montgomery (revised 10.02.2006)