From def4fb88277aa00f41104b5bfac8239ba4341373 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 9 Jun 2011 20:20:08 +0200 Subject: new supported webserver (lightweight) --- module/web/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/web/utils.py') 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") -- cgit v1.2.3