[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher/Browser - BrowserRequest.py:1.1.2.2

Stephan Richter srichter@cbu.edu
Sun, 24 Mar 2002 13:56:44 -0500


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

Modified Files:
      Tag: Zope3-publisher-refactor-branch
	BrowserRequest.py 
Log Message:
- fixed get() implementation, after 'efge' pointed out the insane code.


=== Zope3/lib/python/Zope/Publisher/Browser/BrowserRequest.py 1.1.2.1 => 1.1.2.2 ===
         'See Interface.Common.Mapping.IReadMapping'
 
-        handler = self._key_handlers.get(key, None)
-        if handler is not None:
-            v = handler(self, _marker)
-            if v is not _marker:
-                return v
-        v = self.other.get(key, _marker)
-        if v is not _marker:
-            return v
 
         if key.startswith('U'):
             match = URLmatch(key)
@@ -664,8 +656,20 @@
                 return environ[key]
             return ''
 
-        if v is _marker:
-            v = self.common.get(key, _marker)
+        handler = self._key_handlers.get(key, None)
+        if handler is not None:
+            result = handler(self, self)
+            if result is not self:
+                return result
+
+        result = self._other.get(key, self)
+        if result is not self: return result 
+
+        result = self._common.get(key, self)
+        if result is not self: return result 
+
+        result = self._environ.get(key, self)
+        if result is not self: return result
 
         return default