Personal HTTP Proxy


Learning Objectives

This assignment provides you a chance to learn about one of the most popular application protocols on the Internet- the Hypertext Transfer Protocol (HTTP)v. 1.0 and Java sockets API for client/server application development.

Overview

HTTP proxy acts as a mediator between the client (for example, web browser in a user's computer) and server (for example, web server site). In the simplest case, instead of sending requests directly to the server the client sends all its requests to the proxy. The proxy then opens a connection to the server, and passes on the client's request. The proxy receives the reply from the server, and then sends that reply back to the client. Notice that the proxy is essentially acting like both a HTTP client (to the remote server) and a HTTP server (to the initial client).
Proxy Server

In this assignment, you will implement a personal HTTP proxy based on HTTP 1.0 (defined in detail in RFC 1945).

Uses of a HTTP Proxy

HTTP proxies are are used for the following reasons.

Assignment Requirements & Grading

  1. Upload the web proxy file (Java file or WinRAR file) inside IVLE (Projects->Assignment 2 GROUPS and SUBMISSION - 2006/2007s2-->Group X -->Project Folder) before the due date given below.

  2. The web proxy program should accept the port number as command line argument.

  3. The web proxy should be capable of accepting HTTP requests, making requests from remote servers, and returning the objects to the clients. If the port number is missing in the HTTP request, the web proxy should assume port 80 as default. An invalid request from the client should be answered with an appropriate error code (400 Bad Request - When the request format/syntax is invalid, 405 Method Not Allowed - When methods other than GET/POST/HEADER found in the request).   (3 points)

  4. The web proxy should make a copy of the objects fetched (with the value of Last-Modified header) in its own disk storage. (3 points)

  5. If an object is requested again by a client, the web proxy should send a conditional GET to find whether there is any changes to the object since it was last obtained. If there is no changes, the web cache should send the object to the client from its hard disk with appropriate HTTP headers. otherwise, it should fetch a new copy from the web server and should send it to the client.  (3 points)

  6. Well written (good abstraction, error checking, readability) and well commented code. (1 point)

Administrative Matters

You are required to form your own team of 2 members and register your names in IVLE (Project folder -> Assignment groups) during week 9 (12 Mar – 16 Mar). You can register in one of the available groups which range from group 1 to group 70. Each team member should contribute equally and understand every part of the application. Assessment is based on team work and individual contribution. Assessment methods include peer evaluation, demo and interview.

Recommended platform: Java  (You can use other platforms).

Due for submission: Week 11: 30-Mar-2007 Fri 11.59 PM 

Demo/Interview: Week 12: (02 Apr – 05 Apr). Arrange time/venue with your tutor.


Additional Info (from FAQ):