netty5/codec-haproxy/src
Dominik Obermaier 5bb677e7c2 This PR fixes an issue with the PROXY protocol where the reader index of a consumed byte array was not set correctly.
Motivation:

When using the AF_UNIX PROXY protocol, the reader index was not set correctly after consuming the message bytes of the original header ByteBuf. This caused no immediate harm because after the codepath there is no consumer of the ByteBuf in the current implementation. It’s a bug nevertheless, because consumers of the ByteBuf for extensions (like TLVs, which are allowed by the PROXY protocol spec) would consume a ByteBuf that has a wrong readerIndex when using AF_UNIX instead of e.g. IPv4 (which has correct behaviour)

Modifications:

Increase the reader index of the ByteBuf after it was read

Result:

Correct and consistent behaviour of the AF_UNIX codepath
2016-09-29 21:21:01 +02:00
..
main/java/io/netty/handler/codec/haproxy This PR fixes an issue with the PROXY protocol where the reader index of a consumed byte array was not set correctly. 2016-09-29 21:21:01 +02:00
test/java/io/netty/handler/codec/haproxy Add ProtocolDetectionResult and use it in HAProxyMessageDecoder for allow detect HAProxy protocol. 2015-06-23 08:59:07 +02:00