This tutorial covers the basics of HTTP. It can be used for in-class exercises. see more
Exercise
HTTP/1.1 Exercise
This exercise is based on: http://www.tutorialspoint.com/http/
Assumptions:
1. All requests and responses are based on HTTP/1.1.
2. The connection should be closed after completing each response.
3. A response can be cached for 1 week, if necessary.
Question 1
Give the HTTP request and response for getting webpage.htm from a web server running on web.abc.com, with the following requirements:
1. British English is preferred, but other type of English is also acceptable.
2. Preferred encoding methods are: compress (q=1), gzip (q=0.8) and identity (q=0.5).
3. The resource webpage.htm is already cached in the client browser with ETag "12abc34".
4. The web server is “Apache/2.2.14” running on a 32 bit Windows.
5. The resource in the server has not been changed (i.e., local cached copy can be used).
Question 2
Give the HTTP request and response for getting webpage.htm from a web server running on web.abc.com with the following requirements:
1. Get the resource if it has been modified since 2015-12-25 10:00:00.
2. The preferred character is UTF-8, but ISO-8859-1 is also acceptable.
3. The client only requests for the subsequent 1000 bytes starting from byte 500 and the last 500 bytes of the response.
4. The web server is “Microsoft-IIS/8.0”.
5. The resource on the server has been modified at 2016-01-12 19:15:56.
6. The response should not be cached.