Revision 64b6bc45

b/snf-pithos-app/pithos/api/functions.py
32 32
# or implied, of GRNET S.A.
33 33

  
34 34
from xml.dom import minidom
35
from urllib import unquote
35 36

  
36 37
from django.conf import settings
37 38
from django.http import HttpResponse
......
106 107
    # Helper to avoid placing the token in the URL when loading objects from a browser.
107 108
    token = None
108 109
    if request.method in ('HEAD', 'GET') and COOKIE_NAME in request.COOKIES:
109
        cookie_value = unquote(request.COOKIES.get('COOKIE_NAME', ''))
110
        cookie_value = unquote(request.COOKIES.get(COOKIE_NAME, ''))
110 111
        if cookie_value and '|' in cookie_value:
111 112
            token = cookie_value.split('|', 1)[1]
112 113
    get_user(request, AUTHENTICATION_URL, AUTHENTICATION_USERS, token)

Also available in: Unified diff