Subject: [Sip] Open Issue ID#100 - case sensitivity of URL parameter values

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 14 Jun 2001 11:00:00 -0400

Folks,

The following is an open issue in bis that I would like to discuss. THe
never ending saga of case sensitivity... Here's the problem:

The rules for BNF state:

"literal"
Quotation marks surround literal text. Unless stated otherwise, the text is 
case-insensitive.

And then looking at the SIP URL:

transport-param = "transport="
( "udp" | "tcp" | "sctp" | "tls" | other-transport)

Note how udp, tcp are in quotation marks. This makes them literal text, so
that 
its case insensitive. But, the matching rules say:

Comparisons of scheme name ("sip"), domain names, parameter names and header

names are case-insensitive,
all other comparisons are case-sensitive.

Here, we are talking about a parameter value. This says its case sensitive. 

So, which is it?

Interpretations appear to be mixed. Technically, the correct answer as
written is that they are CS. The reason is that the BNF says that quoted
values are CI *unless stated otherwise*. Well, we did state otherwise.
However, this is a subtletly that is easily missed.

So, we can either stick with whats written, but clarify by explicitly
pointing to the contradiction with the BNF, or be consistent with the BNF
rules, and make it CI. CS is more efficient, CI is more interoperable. I
suspect most people are doing CI for this.

Input?

-Jonathan R.

---
Jonathan D. Rosenberg, Ph.D.                72 Eagle Rock Ave.
Chief Scientist                             First Floor
dynamicsoft                                 East Hanover, NJ 07936
[email-masked]                     FAX:   (973) 952-5050
http://www.jdrosen.net                      PHONE: (973) 952-5000
http://www.dynamicsoft.com

_______________________________________________
Sip mailing list
[email-masked]
http://www.ietf.org/mailman/listinfo/sip

---

From: [email-masked]
Date: Thu, 14 Jun 2001 14:59:56 -0500

> -----Original Message-----
> From: Jonathan Rosenberg [mailto:[email-masked]]

[On the topic of transport paramters to SIP URIs)

> However, this is a subtletly that is easily missed.

I'd argue to keep it as-is: that is, case *sensitive*. Add clarifying
text to the definition of the SIP URL. SIP already has some interesting
performance implications for high-agregation nodes. I'd prefer that
any remaining parsing issues be resolved towards reduction of processing
speed.

Interoperability is still top of my list, though, which is why
I'll ask everyone present: does anyone have an implementation that
sends out transports with uppercase letters?

/a

---

From: Henning Schulzrinne <[email-masked]>
Date: Fri, 15 Jun 2001 15:20:58 -0400

Unfortunately, making it CS somewhat contradicts the general rule in Section 6.5
for headers:

"Unless otherwise stated, parameter names, parameter values and tokens
are case-insensitive.  Values expressed as quoted strings are
case-sensitive."

The transport parameter doesn't use quotation marks and is similar to the
various token parameter values, e.g., in Contact the action parameter, or the
Call-Info purpose values, etc.), so that anything but CI would be yet another
special case.

While I sympathize with the efficiency argument, I suspect that the difference
is small between

if (strcmp(*transport, "udp") == 0) {
  t = UDP;
}
else if (strcmp(*transport, "tcp") == 0} {
  t = TCP;
}

for the "fast path" and adding an additional "slow path" 

else if (strcasecmp(*transport, "udp") == 0) {
  t = UDP;
}
etc.