extend/cowboy — pull request #537 by fishcakez (2013-06-11 21:12:48+00:00)
Title: Fix decoding of chunked body.

@maxlapshin and @benoitc, I believe this is the issue you saw in #481.

`cowboy_http:te_chunked/2` does not reduce it's remaining size when it parses an incomplete chunk.

On the face of it this patch may seem slightly too complicated but given "anything" could be in the buffer passed to it we need to match all these cases.