[Zope-dev] Allowing @ in object ids

Florent Guillaume fg at nuxeo.com
Thu Sep 15 11:19:09 EDT 2005


Today @ is forbidden in object ids. That's controlled by the bad_id  
regexp in OFS.ObjectManager, which tries to ensure that ids will be  
useable as URL components.

However, there's no reason to disallow this, as the URL spec (http:// 
www.ietf.org/rfc/rfc1738.txt) says:

    An HTTP URL takes the form:
       http://<host>:<port>/<path>?<searchpart>
    [...]
    Within the <path> and <searchpart> components, "/", ";", "?" are
    reserved.  The "/" character may be used within HTTP to designate a
    hierarchical structure.

Note that somewhere else in the spec, it says that @ (and others) MAY  
be reserved by some schemes, but HTTP doesn't actually make it reserved.

Furthermore, many projects have monkey-patched bad_id to allow @ and  
see no ill-effects.
Having @ in ids is very useful for various things, one of them being  
to have email-like identifiers (think jabber for instance). There are  
other uses.

Unless there's opposition, I'll change the code to allow it.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com




More information about the Zope-Dev mailing list