Revision 845e24cd pithos/api/auth.py

b/pithos/api/auth.py
37 37
class DummyAuthMiddleware(object):
38 38
    def process_request(self, request):
39 39
        token = request.META.get('HTTP_X_AUTH_TOKEN', None)
40
        if token is None and request.META.get('CONTENT_TYPE', '').startswith('multipart/form-data'):
41
            token = request.POST.get('X-Auth-Token', None)
40
        if token is None:
41
            token = request.REQUEST.get('X-Auth-Token', None)
42 42
        request.user = settings.AUTH_TOKENS.get(token, None)

Also available in: Unified diff