X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Futil.py;h=92b441c08ddb5fb47227f963da8f205eb9c2c7f0;hb=2b4cce75e1eb09715b27fa94b63484c0a6f5a032;hp=7459b6d48a4ff05012060a4e40b3385f6ff70e3b;hpb=9bc70dab473c7057a20d182ce8566ad0a70a7c5d;p=wrw.git diff --git a/wrw/util.py b/wrw/util.py index 7459b6d..92b441c 100644 --- a/wrw/util.py +++ b/wrw/util.py @@ -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): @@ -258,6 +260,6 @@ class specdirty(sessiondata): def datecheck(req, mtime): if "If-Modified-Since" in req.ihead: rtime = proto.phttpdate(req.ihead["If-Modified-Since"]) - if rtime >= math.floor(mtime): + if rtime is not None and rtime >= math.floor(mtime): raise resp.unmodified() req.ohead["Last-Modified"] = proto.httpdate(mtime)