Interactive end-of-chapter exercises


The HTTP RESPONSE message

Consider the figure below, where the server is sending a HTTP RESPONSE message back the client.



Suppose the server-to-client HTTP RESPONSE message is the following:

HTTP/1.1 200 OK
Date: Mon, 23 Dec 2024 17:39:05 +0000
Server: Apache/2.2.3 (CentOS)
Last-Modified: Mon, 23 Dec 2024 17:55:05 +0000
ETag:17dc6-a5c-bf716880.
Content-Length: 66202
Keep-Alive: timeout=23, max=54
Connection: Keep-alive
Content-type: image/html



Question List


1. Is the response message using HTTP 1.0 or HTTP 1.1?

2. Was the server able to send the document successfully? Yes or No

3. How big is the document in bytes?

4. Is the connection persistent or nonpersistent?

5. What is the type of file being sent by the server in response?

6. What is the name of the server and its version? Write your answer as server/x.y.z

7. Will the ETag change if the resource content at this particular resource location changes? Yes or No




Solution


1. The response is using HTTP/1.1

2. Since the response code is 200 OK, the document was received successfully.

3. The document is 66202 bytes.

4. The connection is persistent.

5. The file type the server is sending is image/html.

6. The name and version of the server is Apache/2.2.3

7. Yes. The Etag is a string that uniquely identifies a resource. If a resource is updated, the Etag will change.



That's incorrect

That's correct

The answer was: HTTP/1.1

Question 1 of 7

The answer was: Yes

Question 2 of 7

The answer was: 66202

Question 3 of 7

The answer was: persistent

Question 4 of 7

The answer was: image/html

Question 5 of 7

The answer was: Apache/2.2.3

Question 6 of 7

The answer was: Yes

Question 7 of 7

Try Another Problem

We gratefully acknowledge the programming and problem design work of John Broderick (UMass '21), which has really helped to substantially improve this site.

Copyright © 2010-2022 J.F. Kurose, K.W. Ross
Comments welcome and appreciated: kurose@cs.umass.edu