mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-03 03:50:11 +03:00
Don't use request stream since it can only be read once preventing other middleware (particularly sentry) from accessing it.
This commit is contained in:
parent
fab531961b
commit
088b90a60c
|
@ -295,8 +295,6 @@ class Request(object):
|
||||||
|
|
||||||
if content_length == 0:
|
if content_length == 0:
|
||||||
self._stream = None
|
self._stream = None
|
||||||
elif hasattr(self._request, 'read'):
|
|
||||||
self._stream = self._request
|
|
||||||
else:
|
else:
|
||||||
self._stream = BytesIO(self.raw_post_data)
|
self._stream = BytesIO(self.raw_post_data)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user