[Zope-Checkins] SVN: Zope/trunk/src/ZPublisher/HTTPRequest.py - LP #933307: Fixed ++skin++ namespace handling.

Yvo Schubbe y.2011 at wcm-solutions.de
Thu Feb 16 10:33:21 UTC 2012


Log message for revision 124416:
  - LP #933307: Fixed ++skin++ namespace handling.

Changed:
  U   Zope/trunk/src/ZPublisher/HTTPRequest.py

-=-
Modified: Zope/trunk/src/ZPublisher/HTTPRequest.py
===================================================================
--- Zope/trunk/src/ZPublisher/HTTPRequest.py	2012-02-16 10:32:44 UTC (rev 124415)
+++ Zope/trunk/src/ZPublisher/HTTPRequest.py	2012-02-16 10:33:21 UTC (rev 124416)
@@ -1532,10 +1532,17 @@
     def taintWrapper(self, enabled=TAINTING_ENABLED):
         return enabled and TaintRequestWrapper(self) or self
 
+    # Original version: zope.publisher.http.HTTPRequest.shiftNameToApplication
     def shiftNameToApplication(self):
         """see zope.publisher.interfaces.http.IVirtualHostRequest"""
-        # this is needed for ++skin++
+        if len(self._steps) == 1:
+            self._script.append(self._steps.pop())
+            self._resetURLS()
+            return
 
+        raise ValueError("Can only shift leading traversal "
+                         "names to application names")
+
     def getURL(self):
         return self.URL
 



More information about the Zope-Checkins mailing list