[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/HTTP - HTTPRequest.py:1.1.2.26.2.1

Jim Fulton jim@zope.com
Sat, 27 Apr 2002 12:59:25 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/HTTP
In directory cvs.zope.org:/tmp/cvs-serv26931/lib/python/Zope/Publisher/HTTP

Modified Files:
      Tag: SecurityProxy-branch
	HTTPRequest.py 
Log Message:
Moved security management modules to Zope.Security.

Added like_unto attribute to protect class so you can say that a class
has the same protections as another class::

  <security:protectClass name=".RootFolder." like_unto=".Folder." />

Added some additional calls to removeAllProxies in some component
lookup code while debugging integration of new security model.

Added protections for BTree types.


=== Zope3/lib/python/Zope/Publisher/HTTP/HTTPRequest.py 1.1.2.26 => 1.1.2.26.2.1 ===
 
     def __setupPath(self):
+
         path = self.get('PATH_INFO', '/').strip()
 
         if path.endswith('/'):
@@ -274,14 +275,15 @@
             path = path[1:] # XXX Why? Not sure
 
         clean = []
-        for item in path.split('/'):
-            if item == '.':
-                continue
-            elif item == '..':
-                try: del clean[-1]
-                except IndexError:
-                    raise NotFound('..')
-            else: clean.append(item)
+        if path:
+            for item in path.split('/'):
+                if item == '.':
+                    continue
+                elif item == '..':
+                    try: del clean[-1]
+                    except IndexError:
+                        raise NotFound('..')
+                else: clean.append(item)
 
         clean.reverse()
         self.setTraversalStack(clean)