Multi-Threaded Web & Proxy Server
Project consists of 2 servers;
Web Server
-Server program takes single argument which specifies the port number.
-Server should work when connected via a web browser (such asGoogle Chrome).
For example, if the server port number is 8080, http://localhost:8080/500
would be a valid URL if the server runs in the same host.
-Server returns an HTML document according to the requested URI. The size of
the document is determined by the requested URI (any size between 100 and 20,000 bytes).
-Server sends back an HTTP response line with 400 status code that indicates an error if the requested
URI is not a number, or is less than 100, or is greater than 20,000.
As an example, the following document is 100 bytes long:
Proxy Server
-Proxy server uses port number 8888.
-Proxy server only directs the requests to the web server, it doesn't direct any request to another web server.
-If the requested file size is gerater than 9999 (in other words, if the URI is greater than 9,999) it would not pass the request to the web server.
Rather it sends “Request-URI Too Long” message.
-If the Web Server is not running currently, proxy server would return a “Not Found”
error message.
-The proxy server should work when connected via a browser after configuring the proxy
settings of your browser.
-Proxy also provides caching. The proxy server will cache all the
requested objects in the file system and if the objects are requested again, it will not
forward these requests to the origin server instead returns back the cached file.