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.0 404 Not Found
Date: Fri, 24 May 2024 12:35:56 +0000
Server: Apache/2.2.3 (CentOS)
Content-Length: 874
Connection: Close
Content-type: text/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.0

2. Since the response code is 404 Not Found, the document was NOT received successfully.

3. The document is 874 bytes.

4. The connection is nonpersistent.

5. The file type the server is sending is text/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.0

Question 1 of 7

The answer was: No

Question 2 of 7

The answer was: 874

Question 3 of 7

The answer was: nonpersistent

Question 4 of 7

The answer was: text/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