This commit is contained in:
benethor 2017-04-17 13:58:06 +00:00 committed by GitHub
commit affcf38f5f

View File

@ -93,5 +93,11 @@ class DefaultContentNegotiation(BaseContentNegotiation):
Given the incoming request, return a tokenized list of media
type strings.
"""
header = request.META.get('HTTP_ACCEPT', '*/*')
header = request.META.get('HTTP_ACCEPT')
if not header:
if 'headers' in request.META.keys():
header = request.META['headers'].get('Accept', '*/*')
else:
header = '*/*'
return [token.strip() for token in header.split(',')]