Ensure that chunk buffer contains terminating HTTP newline #42

Merged
merged 2 commits into from Mar 15, 2012

Projects

None yet

2 participants

Contributor
pmakholm commented Mar 8, 2012

If sysread() returns content just short of the termination HTTP newline, then
the content of the chunk is removed from $chunk_buffer while eventually
leaving the HTTP newline. This breaks the invariant that $chunk_buffer will
always start with the size of the next chunk.

@pmakholm pmakholm Ensure that chunk buffer contains terminating HTTP newline
If sysread() returns content just short of the termination HTTP newline, then
the content of the chunk is removed from $chunk_buffer while eventually
leaving the HTTP newline. This breaks the invariant that $chunk_buffer will
always start with the size of the next chunk.
d2a5d15
Owner
miyagawa commented Mar 8, 2012

Can you write a unit test to verify the fix?

@miyagawa miyagawa merged commit f0ac5bd into miyagawa:master Mar 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment