*:96 Internet Application Protocols and Standards

Exam 1998-06-04

The following documents are allowed during the exam:

  1. Documents in Compendium 1, printed on coloured paper.
  2. Documents in Compendium 2, printed on coloured paper.
  3. Documents in Compendium 3, printed on coloured paper.
  4. Ordinary language dictionaries between English and Swedish.

Note 1: Compendium 4 and 5 are not allowed during the exam.

Note 2: Some students may have the compendiums from the previous time this course was given. These compendiums have yellow paper only on the front page of the allowed documents, and there was a separate document Appendix A: ASN.1 syntax (basic items) which is allowed during the exam.

Note 3: A few copies of these compendiums will be available for loan during the exam for students who have not bought the compediums.

Important warning

It is not acceptable to answer an exam question by just a verbatim quote from the allowed documents above. You must show that you understand the question and your answer by using your own words.

Exam in English

You can submit the exam in either Swedish or English. If you want the exam questions in English, you must notify the teacher at least two weeks before the exam.

Questions during the exam

Jacob Palme will come to the examination rooms an hour after the start of the exam.

Special for students who have previously participated in the ASN.1 course

If you have previously participated in, and passed the exam on, the course segment *:73 about ASN.1, then you must skip question 1 in this exam and will then get only 2,5 instead of 3,5 points for this exam (plus 0,5 points for the work task). If you are one of these, you must very clearly mark this on the exam.

Notification of result by e-mail

If you write your e-mail address on the front cover page of the exam, then you will be notified by e-mail if you did not pass the exam.

No.

Question in English Question in Swedish

Max points

1

Specify, using ABNF, a syntax for the date format shown by the example 1998-06-04T12:34:59+01:00, and where the minutes and seconds are allowed to be omitted. Specificera, med ABNF, en syntax för datumformatet som visas av exemplet 1998-06-04T12:34:59+01:00, och där det är tillåtet att utesluta minuter och sekunder.

6

 

Suggested solution 1:

date = 4D "-" 2D "-" 2D %d84 2D  [":" 2D [":" 2D]] 
       ("+"/"-") 2D [":" 2D]
D    = %d48-57

Suggested solution 2:

date             = year "-" month "-" day %d84 time-of-day
                   ("+"/"-") time-zone-offset
year             = 4D
month            = ("0" / "1") D 
day              = ("0" / "1" / "2/ "3") D
time-of-day      = hour [":" sixtile] [":" sixtile]
time-zone-offset = hour [":"sixtile]
hour             = ("0" / "1") D
sixtile          = ("0" / "1" /"2" / "3" / "4" / "5") D
D                = "0" / "1" / "2" / "3" / "4" / "5" /
                   "6" / "7" / "8" / "9"

Note: "T" actually means either upper or lower case T, to specify only upper case T, the numerical value must be specified (But those who wrote "T" got full points since the question did not clearly indicate what "T" meant.)

 

2

A client program connects to a server and sends an operation, and gets a result back. What happens then? Is the connection open, so that the client can send more operations? Answer the question for the protocols SMTP, FTP, HTTP, POP and IMAP. What are the pros and cons of keeping the connection open or closing it down after each operation? Ett klientprogram kopplar upp sig till en server och sänder en operation, och får ett resultat tillbaka. Vad händer därefter? Finns förbindelsen kvar, så att klienten kan sända fler operationer? Besvara frågan för protokollen SMTP, FTP, HTTP, POP och IMAP. Vad är för- och nackdelar med att förbindelsen är kvar eller inte är kvar?

6

 

The session stays open in SMTP, FTP, POP and IMAP. In traditional HTTP (version 1.0) the session is closed by the server immediately after sending the response. HTTP 1.1 allows the session to stay open, but this feature is not used very much. (One might also note that the cookie facility of HTTP can be used to give a user functionality similar to an open session, even if the session does not really stay open.) In FTP, there are two channels, one control channel which stays open until the client closes the channel, servers often close the channel after a time out. The other channel, the data channel, is opened for each file to be transformed and in most cases closed by the server after transmission of each file.

Note 1: The impression to the user may be that the session is closed immediately, with SMTP, FTP and POP, because the client is configured to automatically send a number of operations and then close the connection. But the session does stay open for several client operations, even if this is not always shown to the user.

Note 2: Even if the client takes the initative to close the connection, the actual closing is sometimes done by the server, after a command from the client asking the server to close the connection. This is for example the procedure in IMAP.

Advantange of keeping the session open:

  1. If the user needs to get more information from the same server, time and resources are saved. (However, with HTTP, it may be more important to open several simultaneous session in order to get fast progressive rendering of at least some information, even if the total loading time is not reduced).
  2. The user does not have to send log in and provide authentication information (name, password) more than once. (With HTTP, cookies or hidden fields can be used to simulate a similar effect.)
  3. Information which the user has collected during a session can influence what happens in the future. (Again, HTTP has other ways to simulate this effect.)

Advantage of closing down the session:

  1. Keeping the session open costs resources on the server. This is especially important for large servers who have to manage very many simultaneous users. If the user only needs one connection to get what the user needs, then it is of course extra wasteful to keep a connection open which the user will not use. (Because of this, services for connection-oriented services like FTP, often have a timeout, after which the server will close the connection.)
 

3

An HTML text consists of a text file, consisting of several rows with line breaks (CR, LF or CRLF) between them. Will these line breaks influence how the document ins shown on the screen? En HTML-text består av en textfil, uppdelad på flera rader med radslutstecken (CR, LF eller CRLF) mellan raderna. Påverkar dessa radslutstecken hur dokumentet ser ut när det visas på skärmen?

6

  Yes! In normal mode, line breaks in the transmitted file are rendered as spaces between words (see section 6.2 in the HTML 4 specification) except that line breaks immediately after a start tag and immediately preceding an end tag are ignored (see section B.3.1 in the HTML 4 specification). However, some web browsers do not handle this correctly, and treat also those line breaks as spaces, so it is not advisable to assume that these linke breaks are ignored. In <PRE> preformatted mode (see section 9.3.4 in the HTML 4 specification), line breaks in the transmitted file cause line breaks in the screen rendering.  

4

In e-mail, the name of the sender and the recipient are often specified both in the SMTP "envelope" and in the RFC822-heading. What is the difference in how this information is meant to be used by e-mail software. I e-post förekommer avsändarens och mottagarens namn ofta både på SMTP-"kuvertet", och i RFC822-huvudet. Vad är det för skillnad på hur denna information är avsedd att användas av e-post-program.

6

  The envelope information is used to control the transmission of messages to their recipients, and the transmission of delivery status reports, if requested, in the opposite direction.

The header information is provided for the user, and is usually only interpreted by the user or the client software used by the user. This information is often used to create recipient sets for replies. The header usually gives full information of all recipients for a message (except bcc recipients), while the envelope recipient list at delivery usually only shows the recipient, to which the message is delivered, and no other recipients.

It is important not to use the header information to control delivery, since this can cause wrong delivery (multiple copies, missed recipients, etc.). Some non-standards-compliant mailers, however, used to deliver on header receipients, but this incorrect behaviour is today very rare.