Subject: RE: [SIP] Via header and case sensitivity

From: Itamar Gilad <[email-masked]>
Date: Sun, 17 Sep 2000 10:40:18 +0200

> -----Original Message-----
> From: Henning Schulzrinne [mailto:[email-masked]]
> Sent: Sat, September 16, 2000 1:52 AM
> To: Itamar Gilad
> Cc: 'SIP List'
> Subject: Re: [SIP] Via header and case sensitivity
> 
> 
> Itamar Gilad wrote:
> > 
> > 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.
> 
> Indeed, to be consistent with HTTP, etc., all tokens (except request
> methods) must be CI. I fixed the example.
> 
> > 
> > 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?
> 
> Section 6.5 in -02:
> 
> \begin{changebar}
> Unless otherwise stated, parameter names, parameter values and tokens
> are
> case-insensitive.
> \end{changebar}
> 

I see, but until now as I read this sentence I was under the impression that
it was referring only to header parameters preceded by semi-colons (as
opposed to header fields). Maybe my understanding of what constitutes a
'header parameter' is wrong, but I found the bis-00 wording more straight
forward.

Itamar

> 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
> 
> 
> 
> _______________________________________________
> SIP mailing list
> [email-masked]
> http://lists.bell-labs.com/mailman/listinfo/sip
> 

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