mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 04:50:12 +03:00
Merge 4916d2c9e7
into fd72a814f8
This commit is contained in:
commit
affcf38f5f
|
@ -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(',')]
|
||||
|
|
Loading…
Reference in New Issue
Block a user