netty5/codec-haproxy/src/main/java/io/netty/handler/codec/haproxy
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
..
HAProxyCommand.java Overall refactoring of the haproxy codec 2014-06-21 16:00:27 +09:00
HAProxyConstants.java Overall refactoring of the haproxy codec 2014-06-21 16:00:27 +09:00
HAProxyMessage.java 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
HAProxyMessageDecoder.java Add ProtocolDetectionResult and use it in HAProxyMessageDecoder for allow detect HAProxy protocol. 2015-06-23 08:59:07 +02:00
HAProxyProtocolException.java Overall refactoring of the haproxy codec 2014-06-21 16:00:27 +09:00
HAProxyProtocolVersion.java Overall refactoring of the haproxy codec 2014-06-21 16:00:27 +09:00
HAProxyProxiedProtocol.java Checkstyle 2014-06-21 16:04:13 +09:00
package-info.java Move haproxy codec to a separate module 2014-06-21 15:59:21 +09:00