import re
regex = re.compile('^HTTP_')
dict((regex.sub('', header), value) for header, value in list(request.META.items
    ()) if header.startswith('HTTP_'))
How can I get all the request headers in Django?