Subject: [MMUSIC] A bug in SDP Syntax (CRLF)?

From: Federico Montesino Pouzols <[email-masked]>
Date: Wed, 3 Jul 2002 16:40:00 +0200

Hello everyone,

        draft-ietf-mmusic-sdp-new-10.txt, Section 6, says:

        "The sequence CRLF (0x0d0a) is used to end a record, although
parsers SHOULD be tolerant and also accept records terminated with a
single newline character."

        However, if we look at each and every line definition in the
ABNF syntax in appendix A, all lines must end with CRLF, defined in
RFC 2234 as:

        CRLF           =  CR LF

        CR             =  %d13

        LF             =  %x0A

        An implementor would have to choose between strictly
applying the ABNF or being tolerant with single LFs.

         Should not -at least- a note be added to the ABNF clarifying
this exception? CRLF could also be replaced with something like this:

         line-end      =   CR / CR LF

_______________________________________________
mmusic mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/mmusic

---

From: Bryan Thale <[email-masked]>
Date: Wed, 03 Jul 2002 16:29:13 -0500

> this exception? CRLF could also be replaced with something like this:

Well, line-end = LF / CR LF would be more in keeping with the text.

Bryan.

--
Bryan Thale
Networks & Infrastructure Research, Motorola Labs
mailto:[email-masked]

---

From: Colin Perkins <[email-masked]>
Date: Thu, 04 Jul 2002 08:59:13 -0400

--> Federico Montesino Pouzols writes:
>this exception? 

No. A correct implementation will use CRLF in all cases, and the ABNF
reflects this. Using a single LF to terminate lines is a bug.

Colin

---

From: "Federico Montesino Pouzols" <[email-masked]>
Date: Sat, 6 Jul 2002 15:14:47 +0200 (CEST)

> reflects this. Using a single LF to terminate lines is a bug.

   Then I infer that if I am doing a new implementation and I want it
to be compliant with the specification I must always use CR LF and
consider single LFs as a mistake. All the lines in the SDP
descriptions generated by the new implementation must end with CR LF
and my new parser must not accept descriptions with lines ending with
a single LF?

   This new implementation would follow the ABNF, however it would
also cowardly ignore the _"although parsers SHOULD be tolerant and also
accept records terminated with a single newline character"_ in section
6.

   Using a LF to terminate lines may not be strictly correct, but the
specification recommends (SHOULD) parsers to be tolerant about it. So
I think it would be clearer for implementors if the ABNF syntax
mentioned this exception as a note or whatever.

   From my point of view and my understanding of the draft, an
implementation that in all cases only accepts CR LF is correct in some
sense but would be incorrect at the same time, since it ignores the
quoted sentence in the draft and RFC. In fact, it would reject a lot
of SDP descriptions and could not interoperate with many tools out
there.

---

From: Colin Perkins <[email-masked]>
Date: Sat, 06 Jul 2002 10:40:27 -0400

>of SDP descriptions and could not interoperate with many tools out

SDP descriptions where the lines end in a single LF are incorrect. You may
wish to design your parser such that it accepts them anyway - as suggested
by the draft - but there is no requirement that you do this, and you could
reject such descriptions.

Colin

---

From: "Federico Montesino Pouzols" <[email-masked]>
Date: Sat, 6 Jul 2002 19:10:52 +0200 (CEST)

> SDP descriptions where the lines end in a single LF are incorrect. You
> may wish to design your parser such that it accepts them anyway - as
> suggested by the draft - but there is no requirement that you do this,
> and you could reject such descriptions.
>
> Colin

My doubt arises from the fact that the key word "SHOULD" is used in
the draft. So it seems more a recommendation than a slight
suggestion. Certainly, accepting single LFs is not a must but is is
not a MAY.

When I read the draft, I understand that I could reject descriptions
with single LFs, but only if there are "valid reasons in particular
circumstances...", as the SHOULD key word suggests.