mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 21:40:13 +03:00
Do not treat empty non-form input as HTML input.
This commit is contained in:
parent
075754cd9a
commit
eaef0ab3ee
|
@ -299,7 +299,10 @@ class Request(object):
|
|||
stream = None
|
||||
|
||||
if stream is None or media_type is None:
|
||||
empty_data = QueryDict('', encoding=self._request._encoding)
|
||||
if media_type and not is_form_media_type(media_type):
|
||||
empty_data = MultiValueDict()
|
||||
else:
|
||||
empty_data = {}
|
||||
empty_files = MultiValueDict()
|
||||
return (empty_data, empty_files)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user