Include a selfpath in requests derived from a funplex.
authorFredrik Tolf <fredrik@dolda2000.com>
Fri, 9 May 2014 06:14:21 +0000 (08:14 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Fri, 9 May 2014 06:14:21 +0000 (08:14 +0200)
wrw/util.py

index 557b25d..460344f 100644 (file)
@@ -49,7 +49,9 @@ class funplex(object):
             p = p.partition("/")[0]
             bi = len(p) + 1
         if p in self.dir:
-            return self.dir[p](req.shift(bi))
+            sreq = req.shift(bi)
+            sreq.selfpath = req.pathinfo[1:]
+            return self.dir[p](sreq)
         raise resp.notfound()
 
     def add(self, fun):