webbit/webbit — pull request #99 by normanmaurer (2012-07-13 12:18:34+00:00)
Title: Fix for corrupted POST Data

Its a bug in webbit as you relay on ChannelBuffer.array(). This is a problem as:

You don't check if the ChannelBuffer is really backed by an array which would for example not the case with direct buffers
You don' respect the readerIndex and WriterIndex

It worked before as we did a lot more buffer copies and so you was lucky enough the the ChannelBuffer was backed by an array which was exact the size of the content. This is not the case anymore as we use slice(..) when possible to save a memory copy. I will issue an pull request in webbit with the fix.