CS 268 - Assignment 2: HTTP Proxy


Given: October 4, 2000
Due: November 1, 2000
Language Options: C, C++, or Java
OS Options: It must run on naur or boole

Your assignment is to construct an HTTP proxy that parses the request, contacts the web server, retrieves the data and sends it back to the original client. The program must accept as input a command line argument that specifies the port number to listen on for incoming connections. Informative error messages should be sent back to the client for connection failures and hostname lookup problems. The server should display information as to the request it receives and if it was successfully retrieved or not.

Errors from the proxy should be formatted and displayed in an informative and readable form.

Example

$ http_pproxy 2434

should set the server to listen on TCP port 2434 for HTTP connections to process.

HTTP 1.0 Specification at http://www.w3.org/pub/WWW/Protocols/HTTP/1.0/spec.html

Submission information and input file are here.

Extra Credit

Value: up to +7% onto final grade

For extra credit, make the proxy concurrent (i.e. using fork, threads, or asynchronous control) [2%]. The proxy must "reap" it's children if it forks. And/Or allow the proxy to handle FTP requests as well as HTTP request [5%].


Todd L. Montgomery (revised 10.03.2000)