Commits

Anonymous committed 1127a07

Changed the behavior introduced by ticket #87. It broke some code that relied on getting the unmangled filename on default(). Now it just searches for the objects with the mangled name, but doesnt keep the URL mangled.

Comments (0)

Files changed (1)

     """
     # Let cpg be the first valid object.
     validObjects = ["cpg"]
-     
+    
     # Scan the objPathList in order from left to right
     for index, obj in enumerate(objPathList):
+        # maps virtual filenames to Python identifiers (substitutes '.' for '_')
+        obj = obj.replace('.', '_')
+
         # currentObjStr holds something like 'cpg.root.something.else'
         currentObjStr = ".".join(validObjects)
 
     if path.startswith('/'): path = path[1:] # Remove leading slash
     if path.endswith('/'): path = path[:-1] # Remove trailing slash
 
-    # So that requests like robots.txt can be handled by a method called  robots_txt
-    path = path.replace('.', '_')
-
     if not path:
         objectPathList = []
     else: