Subject: [SIP] Via header and case sensitivity

From: Itamar Gilad <[email-masked]>
Date: Thu, 14 Sep 2000 18:21:06 +0200

In the bakeoff SIP Torture Tests page
(http://www.cs.columbia.edu/~hgs/sip/bakeoff/torture.html) under the
"Illegal but shouldn't crash you" section the following test appears:

  "case-sensitive fields in the wrong case (E.g. Via: sip/2.0/udp)"

I'm not sure why this is illegal.  In 6.46.6 Via syntax is given as:

  Via              = ( "Via" | "v") ":" 1#( sent-protocol sent-by
                     *( ";" via-params ) [ comment ] )
  ...
  sent-protocol    = protocol-name "/" protocol-version "/" transport
  protocol-name    = "SIP" | token
  protocol-version = token
  transport        = "UDP" | "TCP" | token
  ...

In C it says:

   "literal"

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

So basically the protocol name 'sip' and the transport 'udp' should be OK.

While we're on the subject, 2543bis-00 section 6.6 (Header Field format)
specifies the following:
  "Unless otherwise noted, comparisons are case-sensitive. However, any
parameters preceded by semi-colons are case-insensitive, while any quoted
string literals are compared taken case into consideration."

However this was removed from bis-01 and bis-02.  So what is the default
behavior for header values (quoted strings or otherwise) now?

Thanks
  Itamar

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip

---

From: Henning Schulzrinne <[email-masked]>
Date: Fri, 15 Sep 2000 19:52:08 -0400

>    Quotation marks surround literal text. Unless stated otherwise, the text

Indeed, to be consistent with HTTP, etc., all tokens (except request
methods) must be CI. I fixed the example.

> behavior for header values (quoted strings or otherwise) now?

Section 6.5 in -02:

\begin{changebar}
Unless otherwise stated, parameter names, parameter values and tokens
are
case-insensitive.
\end{changebar}

Again, this corresponds to standard HTTP and other BNF-based protocol
rules (including RFC 2234). Values in quotation marks are
case-sensitive, although I can't think of an instance where this would
matter, beyond the "realm" parameter value (which RFC 2617 defines as
cs).

-- 
Henning Schulzrinne   http://www.cs.columbia.edu/~hgs