summaryrefslogtreecommitdiffstats
path: root/module/web/utils.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-09 20:20:08 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-06-09 20:20:08 +0200
commitdef4fb88277aa00f41104b5bfac8239ba4341373 (patch)
tree6fd30426aa91b7e28e420c7ab6d8374b0e14a7a6 /module/web/utils.py
parentbottle.py update (diff)
downloadpyload-def4fb88277aa00f41104b5bfac8239ba4341373.tar.xz
new supported webserver (lightweight)
Diffstat (limited to 'module/web/utils.py')
-rw-r--r--module/web/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/web/utils.py b/module/web/utils.py
index fccfb78d6..81baa4fd2 100644
--- a/module/web/utils.py
+++ b/module/web/utils.py
@@ -93,14 +93,14 @@ def login_required(perm=None):
if perm:
perms = parse_permissions(s)
if not perms.has_key(perm) or not perms[perm]:
- if request.header.get('X-Requested-With') == 'XMLHttpRequest':
+ if request.headers.get('X-Requested-With') == 'XMLHttpRequest':
return HTTPError(403, "Forbidden")
else:
return redirect("/nopermission")
return func(*args, **kwargs)
else:
- if request.header.get('X-Requested-With') == 'XMLHttpRequest':
+ if request.headers.get('X-Requested-With') == 'XMLHttpRequest':
return HTTPError(403, "Forbidden")
else:
return redirect("/login")