object ids with spaces in ZCatalog
I am using a number of ZCatalogs in virtual hosts, and using the modification outlined by Evan Simpson (http://www.zope.org/Members/4am/SiteAccess/patch) which appears to be working fine. Problems have appeared with objects in the ZCatalog with spaces in them however. When uncataloging, the id is urllib.quoted, but the stored object paths are not, so they don't match. I made a quick mod to catalog_object in ZCatalog.py so that it catalogs a urllib.quoted version of the path: self._v_total = (self._v_total + self._catalog.catalogObject(obj, urllib.quote(uid), self.threshold)) It appears to work, but what is the best way of doing this? Are spaces in ids a bad thing? -d -- Adroit | Dyon Balding dyon@adroit.net Internet | http://www.adroit.net/ Solutions | work: +613 98888522, mobile: +61 0414992604
maybe it would be better if it did urllib.unquote before trying to uncatalog? -d On Mon, Apr 10, 2000 at 05:23:47PM +1000, Dyon Balding wrote:
Problems have appeared with objects in the ZCatalog with spaces in them however. When uncataloging, the id is urllib.quoted, but the stored object paths are not, so they don't match.
I made a quick mod to catalog_object in ZCatalog.py so that it catalogs a urllib.quoted version of the path:
self._v_total = (self._v_total + self._catalog.catalogObject(obj, urllib.quote(uid), self.threshold))
It appears to work, but what is the best way of doing this? Are spaces in ids a bad thing?
-- Adroit | Dyon Balding dyon@adroit.net Internet | http://www.adroit.net/ Solutions | work: +613 98888522, mobile: +61 0414992604
participants (1)
-
Dyon Balding