def _user_for_request(self, request):
- if not request.META.has_key('HTTP_AUTHORIZATION'):
+ auth_header = None
+
+ if request.META.has_key('HTTP_AUTHORIZATION'):
+ auth_header = request.META.get('HTTP_AUTHORIZATION')
+ elif request.META.has_key('Authorization'):
+ auth_header = request.META.get('Authorization')
+
+ if auth_header is None or auth_header == '':
raise Exception("No authentication credentials given")
- str = request.META.get('HTTP_AUTHORIZATION').strip()
+ str = auth_header.strip()
+
if not str.startswith('Basic '):
raise Exception("Authentication scheme not supported")
Alias /media/ /srv/patchwork/lib/python/django/contrib/admin/media/
- FastCGIExternalServer /srv/patchwork/htdocs/patchwork.fcgi -socket /srv/patchwork/var/fcgi.sock
+ FastCGIExternalServer /srv/patchwork/htdocs/patchwork.fcgi -socket /srv/patchwork/var/fcgi.sock -pass-header Authorization
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/(images|css|js|media)/.*