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

From: <[email-masked]>
Date: Sat, 2 Dec 2006 22:07:19 +0200

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

---

From: Jonathan Rosenberg <[email-masked]>
Date: Mon, 11 Dec 2006 14:59:19 -0500

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.

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.

-- 
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

---

From: <[email-masked]>
Date: Wed, 13 Dec 2006 13:50:22 +0200

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?

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.

>> 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.
>> ...
>>
>> 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.