Subject: [Sip] bug #1 in draft-ietf-sip-outbound-16 grammar

From: Florian Zumbiehl <[email-masked]>
Date: Mon, 13 Apr 2009 22:50:19 +0200

Hi,

in case you've read my bug report concerning draft-ietf-sip-gruu-15
from this morning, the short version: draft-ietf-sip-outbound-16 is
affected by the same problem.

The complete version:

draft-ietf-sip-outbound-16 contains (amongst others) these ABNF rules:

| contact-params =/ c-p-reg / c-p-instance
| c-p-instance   =  "+sip.instance" EQUAL
|                   LDQUOT "<" instance-val ">" RDQUOT

which, when adding them to the grammar from RFC 3261, would produce
from <Contact> a language that's a superset of the language that would
be produced by <Contact> from RFC 3261-only.

In particular, the language produced by <foo> is a subset of the
"outbound extended" language, but not of the RFC 3261-only one:

| foo = "m: <sip:[email-masked]>;+sip.instance=" DQUOTE "x" DQUOTE SP CRLF

To put it in more practical terms: the <RDQUOT> in <c-p-instance>
allows for trailing <LWS>, which <contact-extension> does not,
so an implementation conforming to draft-ietf-sip-outbound-16 could
produce a Contact header that potentially could not be parsable
(except as an <extension-header>) by an implementation conforming
to RFC 3261.

Thus, I would suggest to replace the rules quoted above by:

| contact-params =/ c-p-reg / c-p-instance
| c-p-instance   =  "+sip.instance" EQUAL
|                   LDQUOT "<" instance-val ">" DQUOTE

This produces the same language, maybe it's a more consistent
replacement:

| contact-params =/ c-p-reg / c-p-instance
| c-p-instance   =  "+sip.instance" EQUAL
|                   DQUOTE "<" instance-val ">" DQUOTE

Florian

---

From: Rohan Mahy <[email-masked]>
Date: Mon, 13 Apr 2009 14:09:30 -0700

Hi Florian,

I think the intent of RFC3261 should have been to allow optional  
whitespace at the end of a quoted-string:

Currently in RFC 3261:
quoted-string = SWS DQUOTE *(qdtext / quoted-pair ) DQUOTE

Probably should have been in RFC 3261:
quoted-string = LDQUOT *(qdtext / quoted-pair ) RDQUOT

However, that is water under the bridge, so I have no objection  
changing the c-p-instance production to look like this:

c-p-instance = "+sip.instance" EQUAL DQUOTE "<" instance-val ">" DQUOTE

If you are responsible for an implementation however, I urge you to be  
generous in what you receive in this regard. Please ignore extraneous  
whitespace unless the spec gives it some special semantic meaning (ex:  
inside a quoted string).

thanks,
-rohan

---

From: Dean Willis <[email-masked]>
Date: Mon, 13 Apr 2009 17:25:07 -0500

On Apr 13, 2009, at 4:09 PM, Rohan Mahy wrote:

> If you are responsible for an implementation however, I urge you to  
> be generous in what you receive in this regard. Please ignore  
> extraneous whitespace unless the spec gives it some special semantic  
> meaning (ex: inside a quoted string).
>

Is this something we should put in the RFC 3261 errata and essential- 
corrections process?

--
Dean