Subject: Re: [Simple] draft-ietf-simple-xcap: Can node selector separator be encoded?

From: Jonathan Rosenberg <[email-masked]>
Date: Mon, 26 Feb 2007 15:57:24 -0500

This is an old note, but an unresolved issue. XCAP just went into auth48 
so we need to figure out what to do here.

I do understand your point now; you could also escape it in the body and 
then double escape it in the URI, and this would work also. As you note, 
this assumes that everyone escapes these in the documents themselves, 
and that would need to be done for all usages that every have documents 
that contain xcap URI as references. Rather than make this broad 
requirement everywhere, I think its easier to add one sentence to xcap 
that says when there are multiple ~~, the first is the separator.

Thanks,
Jonathan R.

[email-masked] wrote:

> Hello, comments below. Thank you for the response.
> 
> Silvestr
> 
> 
>>-----Original Message-----
>>From: Jonathan Rosenberg [mailto:[email-masked]]
>>Sent: Monday, December 11, 2006 8:59 PM
>>To: Peknik Silvestr
>>Cc: [email-masked]
>>Subject: Re: [Simple] draft-ietf-simple-xcap: Can node selector
> 
> separator
> 
>>be encoded?
>>
>>Hmm, this is an issue I think. The XCAP server is supposed to unescape
>>the URI and then look for the ~~ as the node selector separator.
>>However, it will appear twice in the URI in this case - one of them as
>>the content of the anchor attribute in the node selector. You can't
>>double escape it, since the node matching rules aren't based on URI
>>equality, they are based on string equality.
> 
> 
> Silvestr: I am not sure why I cant double-escape it? I thought that I
> have it encoded once in the document itself, and twice in the request
> uri. So after one un-escaping, string comparison of the node selector in
> uri and the value of the anchor attribute in the document would match.
> 
> However clients will probably not escape the body, as there is no
> indication in specifications that they should do so (afaik).
> 
> I will try to get feedback from OMA on this issue.
> 
> 
> 
>>I can think of a few solutions:
>>
>>1. xcap spec should be clarified to say that the FIRST instance of ~~
> 
> is
> 
>>the node selector separator
>>
>>2. xcap-list usage should define an additional attribute of the
>><external> element that can be used as a key for selection, like an
> 
> "id"
> 
>>attribute
>>
>>
>>I'm inclined for #1, since this is much simpler and less of a change.
>>
>>Comments?
>>
>>-Jonathan R.
>>
>>
>>[email-masked] wrote:
>>
>>
>>>Hello,
>>>
>>>I am not sure about following part of the draft:
>>>
>>>6.  URI Construction
>>>...
>>>The node selector separator is a path segment with a value of double
>>
>>tilde ("~~"), and SHOULD NOT be percent-encoded, as advised in Section
> 
> 2.3
> 
>>of RFC 3986 [13]. URIs containing %7E%7E should be normalized to ~~ for
>>comparison; they are equivalent.
>>
>>>...
>>>
>>>Does this mean that the server will treat %7E%7E as node selector
>>
>>separator?
>>
>>>
>>>Background info: OMA-TS-XDM_Core specification which uses this draft
> 
> says
> 
>>that the node selector separator shall appear ONLY once. Consider
> 
> following
> 
>>example:
>>
>>>...
>>><external
> 
> anchor="http://test.com/resource-lists/users/xui/index/~~/foo">
> 
>>>...
>>>
>>>If i want to fetch the <external> element based on the anchor value,
> 
> I
> 
>>need to encode /~~/. So I need to know if it is sufficient to encode it
>>once (so in XCAP URI it will appear as /%7E%7E/) or do I need to encode
> 
> it
> 
>>twice (%257E%257E), in which case I'd need to have it encoded once in
> 
> the
> 
>>body as well.
>>
>>>I hope that is not too confusing.
>>>
>>>Thank you,
>>>
>>>Silvestr Peknik
>>>Software Specialist
>>>TietoEnator
>>>
>>>
>>>_______________________________________________
>>>Simple mailing list
>>>[email-masked]
>>>https://www1.ietf.org/mailman/listinfo/simple
>>>
>>
>>--
>>Jonathan D. Rosenberg, Ph.D.                   600 Lanidex Plaza
>>Cisco Fellow                                   Parsippany, NJ
> 
> 07054-2711
> 
>>Cisco Systems
>>[email-masked]                              FAX:   (973) 952-5050
>>http://www.jdrosen.net                         PHONE: (973) 952-5000
>>http://www.cisco.com
> 
> 

-- 
Jonathan D. Rosenberg, Ph.D.                   600 Lanidex Plaza
Cisco Fellow                                   Parsippany, NJ 07054-2711
Cisco Systems
[email-masked]                              FAX:   (973) 952-5050
http://www.jdrosen.net                         PHONE: (973) 952-5000
http://www.cisco.com

_______________________________________________
Simple mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/simple