Dolda2000 GitWeb
/
wrw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed Python3-compatibility error in multipart code.
[wrw.git]
/
wrw
/
util.py
diff --git
a/wrw/util.py
b/wrw/util.py
index
7c42eae
..
460344f
100644
(file)
--- 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:
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):
raise resp.notfound()
def add(self, fun):
@@
-267,6
+269,6
@@
class specdirty(sessiondata, metaclass=specclass):
def datecheck(req, mtime):
if "If-Modified-Since" in req.ihead:
rtime = proto.phttpdate(req.ihead["If-Modified-Since"])
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)
raise resp.unmodified()
req.ohead["Last-Modified"] = proto.httpdate(mtime)