Saturday, August 13, 2011

Assignment 6 Extension: Due Monday, May 6

Read the following carefully. If you do not identify yourself properly in the requests, you will not receive credit (because we won't know who the request came from). Look carefully at the results returned to you -- it contains useful feedback.

Note that Part 1 may be completed any time before the due date -- there is no additional information you need to fill out on the submit form for Part 1. Using Telnet, submit a valid HTTP 1.1 GET request for the resource whose URL is http://www.courses.fas.harvard.edu/~cscie12/assgn/part1a.cgi In order to identify yourself, send your FAS username as the "User-Agent" in your HTTP request. For example, the FAS user jharvard would include the following HTTP request header:
User-Agent: jharvard
Use your FAS username in place of "jharvard". If you do not include this information, you will not receive credit! Using Telnet, submit a valid HTTP 1.1 HEAD request for the resource whose URL is http://www.courses.fas.harvard.edu/~cscie12/assgn/part1b.cgi In order to identify yourself, send your FAS username as the "User-Agent" in your HTTP request. For example, the FAS user jharvard would include the following HTTP request header:
User-Agent: jharvard
Use your FAS username in place of "jharvard". If you do not include this information, you will not receive credit! Using Telnet, submit a valid HTTP 1.1 GET request for the resource whose URL is http://www.courses.fas.harvard.edu/~cscie12/assgn/part1c.cgi In order to identify yourself, send your FAS username in the query string, using the parameter name FASusername and the value being your FAS username. The parameter name and value are case sensitive! Extra Credit: Using Telnet, submit a valid HTTP 1.1 POST request for the resource whose URL is http://www.courses.fas.harvard.edu/~cscie12/assgn/part1d.cgi In order to identify yourself, send your FAS username in the body of the HTTP request, using the parameter name FASusername and the value being your FAS username. The parameter name and value are case sensitive! Using Telnet, submit a valid HTTP 1.1 GET request for the resource whose URL is http://www.courses.fas.harvard.edu/~cscie12/assgn/part1e.cgi In order to identify yourself, send your FAS username as the value of a Cookie, whose name is FASusername. The cookie name and value are case sensitive! Using Telnet, submit a valid HTTP 1.1 GET request for the resource whose URL is http://www.courses.fas.harvard.edu/~cscie12/assgn/part1f/ This resource is restricted, and you will need to use the username "cscie12" and the password "webdev" (all lowercase, no quotes) to access it. In order to identify yourself, send your FAS username as the "User-Agent" in your HTTP request. When does the resource located at http://www.courses.fas.harvard.edu/~cscie12/assgn/part2.html expire? Create a directory and put a simple HTML file and an image in it. Using directives in an .htaccess file, make the HTML file expire 5 minutes after it has been accessed and make the image expire 1 day after it has been accessed. The content of the HTML file and the image are not important -- the only important characteristic is the expiration time. Important Hint and Help for Part 3 Create custom error documents for your Web site on your FAS account. You should have custom error documents for status codes of 404 and 401. Note that IE may display its own "error page" instead of your custom one, if your custom page is small (in terms of file size). Also, lwp-request may display its own error message instead of your custom one. These "features" are a reason why everyone should know how to use telnet to be an HTTP client! Create a directory within your public_html directory, put a simple HTML file in it, and restrict access to the directory such that requests coming from domain .w3.org are allowed. Requests coming from all other domains should be denied. Create another directory within your public_html directory, put a simple HTML file in it and restrict access to the directory using Basic authentication. Allow the user gradebot with the password letmein to be allowed access to the directory via HTTP Basic authentication.

View the original article here

No comments:

Post a Comment

Popular Posts