extend/cowboy — pull request #552 by asabil (2013-07-02 11:54:45+00:00)
Title: Fix interaction between fragmentation, unmasking and inflating in websocket

The unmasking logic was based on the length of inflated data instead
of the length of the deflated data. This meant data would get corrupted
when we receive a websocket frame split across multiple TCP packets.

The defragmentation logic was not handled properly when deflate was
enabled, where a zlib footer was prematurely appended to the unmasked
buffer.