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

(10 pts) Telnet is not available in Windows 7 by default. to make it available,

ID: 3585602 • Letter: #

Question

(10 pts) Telnet is not available in Windows 7 by default. to make it available, go to Control Panel, Programs and Features, Turn Windows Features On or Off, Check Telnet client. To start Telnet, in Windows command prompt, issue the following command > telnet webserverver 80 2) where "webserver" is some webserver. After issuing the command, you have estab- lished a TCP connection between your client telnet program and the web server. Then type in an HTTP GET message. An example is given below Telnet utopia.poly.edu ET index htnI HTTP/1.1 lost: utepia.poly.edu Line 1 Line Line4 Lines If-nodified-since: Fri. 18 May 2887 89:23:24 GHT TTP/1.1 304 Not Modified Line Line erver: Apache/1.3.9 (Unix) ETag: 1631-3a3-3c6d478b" a) (4pts) Explain which part in the above example is the GET message and which part is the response returned by the web server. b) (3pts) Is this a conditional get request? Explain why or why not. c) (3pts) Explain the "Date" field. d) (3 bonus pts) What's the purpose of the "ETag" field.

Explanation / Answer

a) (4 pts) Explain which part in the above example is the GET message and which part is the response returned by the web server.


Answer:

Below is the GET message:

GET /index.html HTTP/1.1
HOST: utopia.poly.edu
IF-modified-since: Fri, 18 May 2007 09:23:24 GMT


Below is the response returned part by the web server.

HTTP/1.1 304 Not Modified
Date: Mon, 21 May 2007 15:20:05 GMT
Server: Apache/1/3/9 (Unix)
ETag: "1631-3a3-3c6d478b"


b) (3 pts) Is this a conditional get request? Explain why or why not.


Answer:

Yes, this is a conditional GET which is an HTTP GET request as it may or may not return an HTTP 304 response. In this case, it has returned an HTTP 304 response.

The reason being: An HTTP 304 response indicates a resource not been modified since the previous GET. Hence the resource is not returned to the client in such a response. The client basically asks the server if the document is modified after the specified time zone and provide a new document if so or else confirm that it is an old document.


c) (3 pts) Explain the "Date" field.


Answer:

The "Date" field: IF-modified-since: Fri, 18 May 2007 09:23:24 GMT

"If-Modified-Since" is a request header sent to the server. This particular header sends an RFC 2822 formatted date as the value to the server. The proxy which sits between the client and the server checks the date and the cached document. If the condition matches on the content not been modified, a "304 Not Modified" header is sent back to the client in the response.
The date is on Friday the 18th of May in 2007 at 09:23:24 AM GMT (Greenwich Mean Time). The HTTP date is always represented in GMT not in any local time. It is a 24-Hour Format.


The "Date" field: Date: Mon, 21 May 2007 15:20:05 GMT:

Origin server sends a Date header with every response giving the time at which the response was generated. A client machine determines a response to be received from a cache by comparing the Date header to the current time. The date is on Monday the 21st of May in 2007 at 15:20:05 PM GMT (Greenwich Mean Time). The HTTP date is always represented in GMT not in any local time. It is a 24-Hour Format.

d) (3 bonus pts) What's the pupose of the "ETag" field.

Answer:

The "Etag" field represents a unique hash for the document. ETag is called Entity Tag. This is basically a Cache validator. This is used to compare two or more entities from the same client requested resource. This is used when the next time the client requests for the same document within the specified cache time frame. The web-browser on the client machine makes a conditional get request, it then tries to ask the server that if the document is modified after the specified time zone whose hashed value was the Etag value, if so it asks teh server to ONLY THEN return a new document or else confirm that it is an old document.