netty5/codec-http/src
Norman Maurer d036b24a4b Do not depend on the implementation detail of Unpooled.buffer(int) when accessing backing array. (#8865)
Motivation:

We should not depend on the implementation detail of Unpooled.buffer(int) to allocate the exact size of backing byte[] as depending on the implementation it may return a buffer with a bigger backing array.

Modifications:

Explicit allocate the byte[] and wrap it in the ByteBuf. This way we are sure that ByteBuf.array() returns an byte[] which has the exact length and content we expect.

Result:

More correct and safe usage of ByteBuf.array()
2019-02-15 09:39:04 -08:00
..
main/java/io/netty/handler/codec Do not depend on the implementation detail of Unpooled.buffer(int) when accessing backing array. (#8865) 2019-02-15 09:39:04 -08:00
test Handle null "origin" header in "Old Hixie 75 handshake" as proper bad request. (#8864) 2019-02-13 17:16:24 -08:00