Exercise: The HTTP protocol game

In this exercise you are not going to program anything!

You are going to play with the HTTP protocol.

Getting started

Form groups of 2 students.

You need pen and paper, and a bag filled with our usual stuff.

One student plays the role of the HTTP server. The other student plays the role of the HTTP client (often called a browser).

The client student sends an HTTP request written on paper to the server student. The server student receives the HTTP request and sends back an HTTP response.
After 5 minutes the students switch jobs: The client student becomes the server student, and vice versa.

All request and responses must be written on paper, and must conform to the protocol: Don't forget the spaces and the \r\n.

GET requests

The client students sends and ordinary GET request. The URI should refer to something the server student might have in his bag.

The item from the bag must be included in the body part of the response.

Errors

The clients should send request for non-existing items, send illegal requests, etc.

The server sends back proper responses.

"Deep" resources

The client sends a request for a resource like /lunchbox/sandwich, i.e. a resource that is not just inside the root folder (the bag) but merely inside something which is inside the root folder.

Conditional GET

Try sending a conditional GET request.

HEAD requests

The client sends a few HEAD request.

POST requests

The clients sends a few POST requests.