diff --git a/rest_framework/request.py b/rest_framework/request.py index ffbe4a367..e4c07e2c5 100644 --- a/rest_framework/request.py +++ b/rest_framework/request.py @@ -250,6 +250,11 @@ class Request(object): else: self._full_data = self._data + # copy data & files refs to the underlying request so that closable + # objects are handled appropriately. + self._request._post = self._data + self._request._files = self._files + def _load_stream(self): """ Return the content body of the request, as a stream.