From 6a9037cbbdde6ac644683096f8b0b0e53a678b3e Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Thu, 1 Feb 2018 04:50:54 +0100 Subject: [PATCH] Allow funplex to handle requests to root. --- wrw/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wrw/util.py b/wrw/util.py index a1dcc6c..7209ae4 100644 --- a/wrw/util.py +++ b/wrw/util.py @@ -41,6 +41,8 @@ class funplex(object): def __call__(self, req): if req.pathinfo == "": + if "__root__" in self.dir: + return self.dir["__root__"](req) raise resp.redirect(req.uriname + "/") if req.pathinfo[:1] != "/": raise resp.notfound() -- 2.11.0