School of Computing and Information Systems
COMP30023: Computer Systems
Tutorial Week 8
Copyright By PowCoder代写 加微信 powcoder
Service Models, Application Layer: HTTP and Cookies
1. Consider an e-commerce site that wants to keep a purchase record for each of its customers.
Describe how this can be done with cookies.
2. Consider the following string of ASCII characters that were captured by Wireshark when
the browser sent an HTTP GET message (i.e., this is the actual content of an HTTP GET
message). The characters 〈cr〉〈lf〉 are carriage return and line-feed characters Answer the
following questions, indicating where in the HTTP GET message below you find the answer.
GET /people/index.html HTTP/1.1
Host: cis.unimelb.edu.au
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,
image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-AU,en;q=0.9
(a) What is the URL of the document requested by the browser?
(b) What version of HTTP is the browser running?
(c) Does the browser request a non-persistent or a persistent connection?
(d) What is the IP address of the host on which the browser is running?
(e) What type of browser initiates this message? Why is the browser type needed in an
HTTP request message?
3. True or false?
(a) A user requests a Web page that consists of some text and three images. For this page,
the client will send one request message and receive four response messages.
(b) Two distinct Web pages (for example, http://cis.unimelb.edu.au/research/ and
http://cis.unimelb.edu.au/people) can be sent over the same persistent connec-
http://cis.unimelb.edu.au/research/
http://cis.unimelb.edu.au/people
(c) With nonpersistent connections between browser and origin server, it is possible for a
single TCP connection to carry two distinct HTTP request messages.
(d) The Date: header in the HTTP response message indicates when the object in the
response was last modified.
(e) HTTP response messages never have an empty message body.
4. FTP, the File Transfer Protocol, is one of the oldest protocols still in use in the Internet.
Instead of asking for a file in a single request packet, like HTTP does, FTP has a TCP
control channel separate from the data connections, and has the client issue a sequence of
commands like “USER” (set user credentials)“CWD” (cd), “LIST” (ls), “RETR” (get) and “STOR”
(a) What advantages are there in this approach?
(b) What drawbacks are there in this approach?
(c) What is the use of the USER command?
Weekly tutorial participation activity
To obtain a weekly tutorial mark (1% of your overall mark for the subject, totalling to 10% over
the semester), please answer the following questions in Canvas Quiz (called Week 8 Tutorial
Activity). You can have multiple attempts but need to submit the quiz by 11:59 pm AEST on
the day of your tutorial. Only answering all questions correctly will give you the week’s mark.
During the tutorial, your tutor will provide you with the access code that will unlock the quiz for
the corresponding week. The access code is valid only for students in this tutorial. As a result,
we expect you to attend your tutorial class as otherwise the access code you obtain in another
tutorial will not work for you.
If you have a valid reason for not being able to attend your tutorial, please fill in the form accessible
via Canvas by Friday 8pm AEDT of the corresponding week. You will be given an access code
during the next business day. The code will not be provided otherwise, hence, please do not email
the subject coordinator or other staff members including your tutor asking for the code. We will
monitor such requests and may limit the number of times an access code is given to the same
student throughout the semester to encourage participation and attendance of the tutorials.
1. In URLs, the hostname portion is case-insensitive, but the path portion is case-sensitive.
This is because
• The URL standard was designed by a committee, and different parts of the committee
disagreed with each other about case sensitivity.
• There were already standards for hostnames and for file names, and the URL standard
was trying to combine these into one format.
• They wanted to make it confusing, in a failed attempt to restrict the internet to IT
• It allows more efficient processing within the network.
2. If a web page contains some text and three images, how many HTTP GET commands will
the client send?
3. How does an HTTP server know which object on a web site to fetch?
• The client sends a sequence of ”cd” commands to navigate to the desired object
• It uses the Host header line of the request packet
• It parses the URL in the browser’s address bar
• It is specified in the GET request line of the request packet
4. Which of the following is a major difference between FTP and SMTP
(a) How old they are.
(b) SMTP sends the whole message to one MTA, which waits until it is all received before
forwarding it on to the next etc., but with FTP, each packet is forwarded as soon as it
is received.
(c) There is no way for SMTP to send data that isn’t 7-bit ASCII, because the original
specification says that the headers and body need to be 7-bit ASCII
(d) SMTP can make data available only to one user, whereas anyone can download data
from an FTP site.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com