Fixed bug #18972 #782

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

An alternate implementation of doda's patch at #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.

datagrok added some commits Feb 23, 2013

@datagrok datagrok Add a unit test to exercise chunking behavior
Bug #18972 reports that the math used
django.core.servers.basehttp.ServerHandler.write to break large data
into chunks before writing is incorrect, but since an array slice whose
end exceeds the array's length automatically truncates, nothing actually
breaks because of this mistake.

This commit adds a unit test that verifies this and allows for easy
refactoring of the chunking code.
3513433
@datagrok datagrok Improve chunking logic
An alternate implementation of doda's patch at
#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.
0f86d88
Member

charettes commented Mar 18, 2013

Your work as been rebased by @woodm1979 in #921. Will add a review there.

charettes closed this Mar 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment