From: root Date: Fri, 16 Mar 2012 12:54:41 +0000 (+0200) Subject: Fix. X-Git-Tag: pithos/v0.9.3~4 X-Git-Url: https://code.grnet.gr/git/pithos/commitdiff_plain/64b6bc4597657ce76fb9a2e1259efb5588efa9da Fix. --- diff --git a/snf-pithos-app/pithos/api/functions.py b/snf-pithos-app/pithos/api/functions.py index 3476e57..0010f91 100644 --- a/snf-pithos-app/pithos/api/functions.py +++ b/snf-pithos-app/pithos/api/functions.py @@ -32,6 +32,7 @@ # or implied, of GRNET S.A. from xml.dom import minidom +from urllib import unquote from django.conf import settings from django.http import HttpResponse @@ -106,7 +107,7 @@ def object_demux(request, v_account, v_container, v_object): # Helper to avoid placing the token in the URL when loading objects from a browser. token = None if request.method in ('HEAD', 'GET') and COOKIE_NAME in request.COOKIES: - cookie_value = unquote(request.COOKIES.get('COOKIE_NAME', '')) + cookie_value = unquote(request.COOKIES.get(COOKIE_NAME, '')) if cookie_value and '|' in cookie_value: token = cookie_value.split('|', 1)[1] get_user(request, AUTHENTICATION_URL, AUTHENTICATION_USERS, token)