tomchristie/django-rest-framework — pull request #1098 by SeiryuZ (2013-09-11 06:12:53+00:00)
Title: Fixed parser not setting stream on Django request

I opened this PR due to rest_framework's parser consuming the stream from django ``HttpRequest`` object without setting the appropriate variable back.

In django's ``HttpRequest``, after reading the stream, it should set the variable ``_body`` and reset the ``_stream`` so other resources can consume it.

When using rest_framework, this variable is not properly set as to parser's directly consuming the stream. In my use case, logging the error using getsentry (https://getsentry.com), this has created unintended consequences of not being able to read the ``request.body``, since sentry is trying to consume the django's request, but not able to parse the ``_body`` or ``_stream`` attribute correctly.

This fix is done by calling ``body`` property on django request object, in which it will read the stream and `reset` the stream back for others to consume

Feel free to add comments, or change my code.