2.2 knowledge checks CS656

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Suppose a client is sending an HTTP GET request message to a web server, gaia.cs.umass.edu. Suppose the client-to-server HTTP GET message is the following: GET /kurose_ross_sandbox/interactive/quotation2.htm HTTP/1.1 Host: gaia.cs.umass.edu Accept: text/plain, text/html, text/xml, image/jpeg, image/gif, audio/mpeg, audio/mp4, video/wmv, video/mp4, Accept-Language: en-us, en-gb;q=0.1, en;q=0.7, fr, fr-ch, da, de, fiIf-Modified-Since: Wed, 09 Sep 2020 16:06:01 -0700 User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 What version of HTTP is the client using?

1.1

What is an HTTP cookie used for? A: A cookie is a code used by a server, carried on a client's HTTP request, to access information the server had earlier stored about an earlier interaction with this Web browser. [Think about the distinction between a browser and a person.] B: A cookie is used to spoof client identity to an HTTP server. C: A cookies is a code used by a server, carried on a client's HTTP request, to access information the server had earlier stored about an earlier interaction with this person. [Think about the distinction between a browser and a person.] D: Like dessert, cookies are used at the end of a transaction, to indicate the end of the transaction. E: A cookie is a code used by a client to authenticate a person's identity to an HTTP server.

A: A cookie is a code used by a server, carried on a client's HTTP request, to access information the server had earlier stored about an earlier interaction with this Web browser. [Think about the distinction between a browser and a person.]

Which of the following are advantages of using a web cache? Sselect one or more answers. A: Caching allows an origin server to more carefully track which clients are requesting and receiving which web objects. B: Caching generally provides for a faster page load time at the client, if the web cache is in the client's institutional network, because the page is loaded from the nearby cache rather than from the distant server. C: Overall, caching requires fewer devices/hosts to satisfy a web request, thus saving on server/cache costs. D: Caching uses less bandwidth coming into an institutional network where the client is located, if the cache is also located in that institutional network.

B: Caching generally provides for a faster page load time at the client, if the web cache is in the client's institutional network, because the page is loaded from the nearby cache rather than from the distant server. D: Caching uses less bandwidth coming into an institutional network where the client is located, if the cache is also located in that institutional network.

Which of the following are changes between HTTP 1.1 and HTTP/2? Note: select one or more answers. A: HTTP/2 allows a large object to be broken down into smaller pieces, and the transmission of those pieces to be interleaved with transmission other smaller objects, thus preventing a large object from forcing many smaller objects to wait their turn for transmission. B: HTTP/2 provides enhanced security by using transport layer security (TLS). C: HTTP/2 allows objects in a persistent connection to be sent in a client-specified priority order. D: HTTP/2 has many new HTTP methods and status codes.

B: HTTP/2 provides enhanced security by using transport layer security (TLS). D: HTTP/2 has many new HTTP methods and status codes.

What is the purpose of a cookie value in the HTTP GET request? A: The cookie value encodes a default set of preferences that the user has previously specified for this web site. B: The cookie value is an encoding of a user email address associated with the GET request. C: The cookie value itself doesn't mean anything. It is just a value that was returned by a web server to this client during an earlier interaction. D: The cookie value encodes the format of the reply preferred by the client in the response to this GET request. E: The cookie value indicates whether the user wants to use HTTP/1, HTTP/1.1, or HTTP/2 for this GET request.

C: The cookie value itself doesn't mean anything. It is just a value that was returned by a web server to this client during an earlier interaction.

Which of the following pieces of information will appear in a server's application-level HTTP reply message? (Check all that apply.) A: The server's IP address B: The name of the Web server (e.g., gaia.cs.umass.edu) C: A sequence number D: A response code E: A response phrase associated with a response code F: A checksum

D: A response code E: A response phrase associated with a response code

What is the purpose of the HTTP GET message? A: The HTTP GET request message is sent by a web server to a web client to get the next request from the web client. B: The HTTP GET request message is used by a web client to post an object on a web server. C: The HTTP GET request message is sent by a web server to a web client to get the identity of the web client. D: The HTTP GET request message is used by a web client to request a web server to send the requested object from the server to the client.

D: The HTTP GET request message is used by a web client to request a web server to send the requested object from the server to the client.

What is the purpose of the conditional HTTP GET request message? A: To allow a server to only send the requested object to the client if the client is authorized to received that object. B: To allow a server to only send the requested object to the client if the client has never requested that object before. C: To allow a server to only send the requested object to the client if the server is not overloaded. D: To allow a server to only send the requested object to the client if this object has changed since the server last sent this object to the client.

D: To allow a server to only send the requested object to the client if this object has changed since the server last sent this object to the client.

Again, suppose a client is sending an HTTP GET request message to a web server, gaia.cs.umass.edu. Suppose the client-to-server HTTP GET message is the following (same as in previous problem): GET /kurose_ross_sandbox/interactive/quotation2.htm HTTP/1.1 Host: gaia.cs.umass.edu Accept: text/plain, text/html, text/xml, image/jpeg, image/gif, audio/mpeg, audio/mp4, video/wmv, video/mp4, Accept-Language: en-us, en-gb;q=0.1, en;q=0.7, fr, fr-ch, da, de, fiIf-Modified-Since: Wed, 09 Sep 2020 16:06:01 -0700 User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 Does the client have a cached copy of the object being requested? A: There's not enough information in the header to answer this question. B: No, because a client would not request an object if it had that object in its cache. C: Yes, because HTTP 1.1 is being used. D: Yes, because this is a conditio

D: Yes, because this is a conditional GET, as evidenced by the If-Modified-Since field.

Suppose now the server sends the following HTTP response message the client: HTTP/1.0 200 OK Date: Wed, 09 Sep 2020 23:46:21 +0000 Server: Apache/2.2.3 (CentOS) Last-Modified: Wed, 09 Sep 2020 23:51:41 +0000 ETag:17dc6-a5c-bf716880. Content-Length: 418 Connection: Close Content-type: image/html Will the web server close the TCP connection after sending this message? A: Yes, because the HTTP response indicated that only one object was requested in the HTTP GET request. B: No, the server will leave the connection open as a persistent HTTP connection. C: There's not enough information in the response message to answer this question. D: Yes, the server will close this connection because version 1.0 of HTTP is being used, and TCP connections do not stay open persistently.

D: Yes, the server will close this connection because version 1.0 of HTTP is being used, and TCP connections do not stay open persistently.

What do we mean when we say "HTTP is stateless"? In answering this question, assume that cookies are not used. Check all answers that apply. A: The HTTP protocol is not licensed in any country. B: An HTTP client does not remember the identities of the servers with which it has interacted. C: An HTTP client does not remember anything about what happened during earlier steps in interacting with any HTTP server. D: We say this when an HTTP server is not operational. E: An HTTP server does not remember anything about what happened during earlier steps in interacting with this HTTP client.

E: An HTTP server does not remember anything about what happened during earlier steps in interacting with this HTTP client.

What is the purpose of the If-Modified-Since field in a HTTP GET request message A: To indicate to the server that the server should replace this named object with the new version of the object attached to the GET, if the object has not been modified since the specified time B: To indicate to the server that the client wishes to receive this object, and the time until which it will cache the returned object in the browser's cache. C: To inform the HTTP cache that it (the cache) should retrieve the full object from the server, and then cache it until the specified time. D: To allow the server to indicate to the client that it (the client) should cache this object. E: To indicate to the server that the client has cached this object from a previous GET, and the time it was cached.

E: To indicate to the server that the client has cached this object from a previous GET, and the time it was cached.

Again, suppose a client is sending an HTTP GET request message to a web server, gaia.cs.umass.edu. The client-to-server HTTP GET message is the following (same as in previous problem): GET /kurose_ross_sandbox/interactive/quotation2.htm HTTP/1.1 Host: gaia.cs.umass.edu Accept: text/plain, text/html, text/xml, image/jpeg, image/gif, audio/mpeg, audio/mp4, video/wmv, video/mp4, Accept-Language: en-us, en-gb;q=0.1, en;q=0.7, fr, fr-ch, da, de, fiIf-Modified-Since: Wed, 09 Sep 2020 16:06:01 -0700 User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 What is the language in which the client would least prefer to get a response? [You may have to search around the Web a bit to answer this.]

United Kingdom English

Suppose an HTTP server sends the following HTTP response message a client: HTTP/1.0 200 OK Date: Wed, 09 Sep 2020 23:46:21 +0000 Server: Apache/2.2.3 (CentOS) Last-Modified: Wed, 09 Sep 2020 23:51:41 +0000 ETag:17dc6-a5c-bf716880. Content-Length: 418 Connection: Close Content-type: image/html Will the web server close the TCP connection after sending this message?

Yes, because this is HTTP 1.0

Suppose a client is sending an HTTP GET message to a web server, gaia.cs.umass.edu. Suppose the client-to-server HTTP GET message is the following: GET /kurose_ross_sandbox/interactive/quotation2.htm HTTP/1.1 Host: gaia.cs.umass.edu Accept: text/plain, text/html, text/xml, image/jpeg, image/gif, audio/mpeg, audio/mp4, video/wmv, video/mp4, Accept-Language: en-us, en-gb;q=0.1, en;q=0.7, fr, fr-ch, da, de, fi If-Modified-Since: Wed, 09 Sep 2020 16:06:01 -0700 User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11 Does the client have a cached copy of the object being requested?

Yes, because this is a conditional GET.


Kaugnay na mga set ng pag-aaral

Pharmacology 106: Ch. 31 Thyroid and Antithyroid Drugs

View Set

English Vocabulary in Use Elementary - unit 13 (in the living room)

View Set

Questions for Act 2 of The Crucible

View Set

The Age of Exploration Unit Test 5

View Set

History of Costume Exam 2 - use for final

View Set

Chapter Reviews- Ch. 6: Conditional Processing

View Set