Program 3 Testing ================= CS 455 - 90 points CS 555 - 100 points Requirements: 1) [5 points] Take a port (higher than 1024) as the only command-line argument. This port is what the server will listen for requests on. If given no command-line argument, print a "Usage" statement and exit. 2) [5 points] For each new connection, display the client's IP address and port. 3) [10 points] For each request, write the current date/time, client's IP address and port, and the requested URL to a text file named 'proxy-log.txt' - one request per line. Example: 10/23/2007 14:53:40 EDT 128.82.5.53 51617 http://www.cs.odu.edu/~mweigle/ 4) [10 points] Print the request header received from the client. 5) [10 points] Modify the request as needed. Your proxy server should not send any request header fields that do not start with "Accept", "Cookie", "Host", or "User-Agent". Print the modified request header that is sent to the server. 6) [10 points] Print the response header received from the server. 7) [10 points] Your proxy server must keep processing requests until the user quits the program with Ctrl-C. 8) [15 points] Your proxy server must handle all types of requests and responses, including those for images. 9) [10 points] Your proxy server must manage connections according to the default specifications for HTTP/1.0. (One connection per request/response.) 10) [5 points] Your source file must be named HTTPProxyServer.java CS 555 ONLY [10 points] ----------- Write the answers to the following questions in a file named Prog3.txt and submit it with your source code: 1. Request a URL with your HTTP client from Program 2. What was the response time? 2. Modify your HTTP client from Program 2 to use your proxy server (send the request with the full URL in the GET line and connect to the proxy server instead of the web server). Request the same URL as above using the proxy server. What was the response time? 3. Were these response times different? If so, why? URLs tested ----------- 1) http://www.cs.odu.edu/~mweigle/ 2) http://www.cs.odu.edu/~mweigle/courses/cs455-f07/syllabus.pdf 3) http://www.unc.edu/ 4) http://www.2theadvocate.com/sports/ 5) http://www.youtube.com/watch?v=gcLc8Dw5y40