Dolda2000 GitWeb
/
wrw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into python2
[wrw.git]
/
wrw
/
util.py
diff --git
a/wrw/util.py
b/wrw/util.py
index
f70680e
..
22bce9d
100644
(file)
--- a/
wrw/util.py
+++ b/
wrw/util.py
@@
-10,7
+10,10
@@
def wsgiwrap(callable):
def formparams(callable):
spec = inspect.getargspec(callable)
def wrapper(req):
def formparams(callable):
spec = inspect.getargspec(callable)
def wrapper(req):
- data = form.formdata(req)
+ try:
+ data = form.formdata(req)
+ except IOError:
+ raise resp.httperror(400, "Invalid request", "Form data was incomplete")
args = dict(data.items())
args["req"] = req
if not spec.keywords:
args = dict(data.items())
args["req"] = req
if not spec.keywords:
@@
-49,7
+52,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):