Subject: RE: [Sip] Draft -08 comments, part 3: "major" issues

From: "James Undery" <[email-masked]>
Date: Wed, 27 Feb 2002 17:07:33 -0000

Hi,

After reading 1703-07, I've a few comments, should the uri scheme and
host be case-smashed to produce a canonical form; and I am a bit
concerned about unescaping sip:[email-masked] (although would be
surprised at any legitimate use).

James

> -----Original Message-----
> From: Robert Sparks [mailto:[email-masked]]
> Sent: 27 February 2002 16:12
> To: Jonathan Lennox
> Cc: Jonathan Rosenberg; [email-masked]
> Subject: Re: [Sip] Draft -08 comments, part 3: "major" issues
> 
> 
> Look at lines 1703-1707 of bis-08.pdf
> 
> 
> > > > Section 19.1.4:
> > > > What was the motivation for making URI comparisons 
> non-transitive, and
> > > > special casing certain uri-parameters?  It seems like 
> it just makes a
> > > > lot of implementation things much harder.  Wouldn't it 
> be simpler just
> > > > to say that uri parameters must match?  This would mean 
> that the URI
> > > > comparison code could be completely ignorant of the 
> semantics of URI
> > > > parameter names, and old and new parameters are treated equally.
> > > 
> > > This is a general mechanism for backwards compatibility. 
> I agree that
> > > transitivity would be nice in theory, but it seemed a riskier
> > > proposition.
> > 
> > I realized last night the real problem with this.  It means 
> you can't
> > canonicalize a SIP URI.
> > 
> > Here's an example.  In our server, we use a SQL database as 
> the back end to
> > our registration service.  Since SQL doesn't understand SIP 
> URIs, only
> > strings, we convert all URIs into a canonical string form 
> before inserting
> > them into the database.  In the previous spec this meant 
> case-smashing all
> > CI elements, deleting default parameters, and 
> lexicographically sorting all
> > the parameters and headers.  Then, to accomplish 
> registration updates, we
> > just use the address-of-record and the contact URI as 
> database keys, and the
> > database does everything correctly.
> > 
> > With bis-08's URI comparison rules, there's *no way* to do 
> this.  (Trivial
> > proof: string equality is an equivalence relation.)  We'd 
> have to somehow
> > put knowledge of these URI comparison rules into the 
> database access code.
> > I *guess* this means putting both a 
> all-nonstandard-parameters-stripped form
> > and a nonstandard-parameters-present form in the database, 
> querying for
> > both, updating both, deleting as necessary...it's going to 
> be a rat's nest,
> > and probably a lot less efficient.
> > 
> > I imagine a whole lot of implementations are using string or hash
> > comparisons of canonicalized URIs, in some form or another, 
> for their
> > location services...
> > 
> > -- 
> > Jonathan Lennox
> > [email-masked]
> 
> 
> _______________________________________________
> Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
> This list is for NEW development of the core SIP Protocol
> Use [email-masked] for questions on current sip
> Use [email-masked] for new developments on the application of sip
> 

_______________________________________________
Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use [email-masked] for questions on current sip
Use [email-masked] for new developments on the application of sip

---

From: Sean Olson <[email-masked]>
Date: Wed, 27 Feb 2002 10:29:08 -0800 (PST)

> surprised at any legitimate use).

This is not the first time this has come up. 
I've always been of the opinion that you must 
unescape to get a canonical form. Otherwise we
will potentially run into comparison problems
because two different implementations decided
to escape different sets of chararcters. 

Sean

=====
Sean Olson <[email-masked]>

__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com

---

From: Jonathan Lennox <[email-masked]>
Date: Wed, 27 Feb 2002 13:55:43 -0500

> to escape different sets of chararcters. 

If you're just worrying about your internal representations, though, there's
nothing wrong with unescaping and then re-escaping, so long as you use a
consistent set of escaping characters for your re-escaping.

The spec only dictates behavior, not implementation.

-- 
Jonathan Lennox
[email-masked]

---

From: Sean Olson <[email-masked]>
Date: Wed, 27 Feb 2002 11:11:05 -0800 (PST)

Internal representation is of course an implemenation
detail. However, the rules for comparison of URIs
is not. If you implement this behaviour using an
un-escape/re-escape sequence, that's fine. As
long as the behaviour is described to indicate
that comparisons occur on the un-escaped URI.

/sean

--- Jonathan Lennox <[email-masked]> wrote:
> On Wednesday, February 27 2002, "Sean Olson" wrote
> to "James Undery, Robert Sparks, Jonathan Lennox,
> Jonathan Rosenberg, [email-masked]" saying:
> 
> > 
> > > After reading 1703-07, I've a few comments,
> should
> > > the uri scheme and
> > > host be case-smashed to produce a canonical
> form;
> > > and I am a bit
> > > concerned about unescaping
> sip:[email-masked]
> > > (although would be

=====