Re: CPIM and URIs

Graham Klyne <[email protected]>
Newsgroups gmane.ietf.impp
Message-ID <[email protected]>
At 11:32 AM 5/24/02 -0400, John D. Ramsdell wrote:
>Graham Klyne <[email protected]> writes:
>
> > I think that is about right, but I also think it doesn't really matter.
> >
> > At the end of the day, an im: URI is just a URI that is used to
> > address an instant inbox.
>
>In seems to me that we must agree on what content is allowed in the
>decoded scheme specific part of an instant inbox URI.  From your
>discussion, it appears that I got the description wrong!  I made the
>assumption that all instant inbox URIs are opaque, but the following
>URI seems legal after all:
>
>         im://mitre.org/[email protected]
>
>since "//mitre.org/ramsdell"@ninebynine.org is a valid email address.

Touche!

Yes, it's a valid email address.  The semantically relevant part, per my 
reading of the specs is //mitre.org/[email protected], so yes that 
would be the logical translation.  Except that RFC2396 reserves "/" at the 
start of a URI for a hierarchical schema (e.g. for the purposes of 
resolving relative URIs), so I'm thinking that that maybe should be 
escaped; e.g.

   im:%2f/mitre.org/[email protected]

but I'm not sure if that's right.

>Let me try this definition instead.
>
>   URI u is an instant inbox URI if and only if all of the following
>   are true:
>
>         * The scheme of u is the string "im".
>
>         * There exists an RFC 2822 email address e such that the
>           decoded scheme specific part of u is identical to e after
>           all invisible characters in e are removed, using the RFC
>           2822 definition of an invisible character.
>
>         * The fragment part of u is absent.

Well, yes, I can't disagree with this (except maybe to deal with leading 
"/" - see above).

But I'm worried that this is making a simple thing complicated, or at least 
difficult to follow for people who aren't familiar with the other related 
specs.  Maybe, instead, we could just define a syntax for an im: URI, and 
leave it at that?

E.g. something like this

[[
    Inboxes are named using URIs with the following ABNF syntax:

        ;; Domain is defined in [RFC2821], either a FQDN or a literal
        inbox       = "im:" local "@" Domain

        local       = address [ "/" subaddress ]

        address     = token

        subaddress  = token

        ;; all non-control characters, excluding "/" and "@" delimiters
        token       = 1*(%x20-2E / %x30-3F / %x41-7E / UTF-8) ;; [RFC2044]

    URI character escaping (%hh) is used as necessary when presenting the
    URI to an environment that expects a US-ASCII URI character sequence
    to be used [RFC2396, section 2.1].
]]

(This was adapted from email addresses, but is not identical to RFC2821/2 
syntax.)

#g

-------------------
Graham Klyne
<[email protected]>



  [reminder: [email protected] for non-technical discussions, please]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.