django/django — pull request #782 by datagrok (2013-02-23 16:47:48+00:00)
Title: Fixed bug #18972

An alternate implementation of doda's patch at https://github.com/django/django/pull/415, that avoids the "offset" math in favor of just stuffing the data into a BytesIO and then .read()ing from it with a sentinel-style iterator.

Includes a unit test from a previous pull request, all tests pass.