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 404 Not Found
Date: Fri, 02 Dec 2022 15:42:49 +0000
Server: Apache/2.2.3 (CentOS)
Content-Length: 72887
Keep-Alive: timeout=47, max=75
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 404 Not Found, the document was NOT received successfully.

3. The document is 72887 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: No

Question 2 of 7

The answer was: 72887

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