Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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

ID: 3884375 • Letter: S

Question

Suppose the server-to-client HTTP RESPONSE message is the following:
HTTP/1.1 200 OK

Date: Fri, 31 Jul 2015 17:10:10 +0000

Server: Apache/2.2.3 (CentOS)

Last-Modified: Fri, 31 Jul 2015 17:26:10 +0000

ETag:17dc6-a5c-bf716880.

Content-Length: 4036

Keep-Alive: timeout=44, max=51

Connection: Keep-alive

Content-type: text/html

The advanced questions below may require you to dig into the HTTP specification [RFC 7231] or other online documents:
Give the default connection timeout for the given server.
Should the timeout value be short or long? Give reasons for your choice of answer.
Is the connection dropped or kept open after the timeout? Can the connection be extended even after a timeout? Explain briefly.
What are the maximum number of requests and responses the server has allowed? What happens when the maximum number of requests and responses are sent?
What is the ETag in the success response message sent? State its significance.
Will the ETag change if the resource content at this particular resource location changes?

Explanation / Answer

--->Give the default connection timeout for the given server. :

Here keep-alive has timeout value = 44 second.

hence default time out for given server will be 44 sec. As connection will be closed if it remains unused for 44 sec. .

--->  Should the timeout value be short or long? Give reasons for your choice of answer.

Time out value can not be too long or too short. If it is too long then due to high traffic there will be many open TCP connection at a time at server's side. If value is too short then it doesnt serve the purpose of keeping timeout attribute. Hence value of timeout can not be too long or too short.

--->  Is the connection dropped or kept open after the timeout? Can the connection be extended even after a timeout? Explain briefly.

here HTTP/1.1 is used, in which by default all keep-alive connections are kept open. If it was HTTP/1.0 then connection is closed after timeout. After timeout connection can not be extended. Timeout is a value provided by server to client. client has to make next request within that time to keep the connection open.

---> What are the maximum number of requests and responses the server has allowed? What happens when the maximum number of requests and responses are sent?

Keep-Alive: timeout=44, max=51

this line shows that maximum of 51 request/responses can be served by the server in current connection. When 51 requests/responses are sent, server closes the connection and client has to initiate new connection for another request.

--->What is the ETag in the success response message sent? State its significance.

ETag:17dc6-a5c-bf716880.

This is an identifier for specific version of resource. For each version Etag is created. When resource has not changed server doesn't need to send the resource again. In such cases only Etag is checked for resources to save bandwidth.

---> Will the ETag change if the resource content at this particular resource location changes?

Yes Etag changes with change in resource. New Etag is generated for each resource version.

If you have any doubts then you can ask in comment section.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote