From: Willy Tarreau Date: Sun, 12 Feb 2023 08:26:48 +0000 (+0100) Subject: DOC: proxy-protocol: fix wrong byte in provided example X-Git-Tag: v2.8-dev4~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e008402972e58ab99506bbbbf4d540a21f5be465;p=thirdparty%2Fhaproxy.git DOC: proxy-protocol: fix wrong byte in provided example There was a mistake in the example of proxy-proto frame provided, it cannot end with 0x02 but only 0x20 or 0x21 since the version is in the upper 4 bits and the lower ones are 0 for LOCAL or 1 for PROXY, hence the example should be: \x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A\x20 Thanks to Bram Grit for reporting this mistake. --- diff --git a/doc/proxy-protocol.txt b/doc/proxy-protocol.txt index 4d49d5cd1c..fac0331769 100644 --- a/doc/proxy-protocol.txt +++ b/doc/proxy-protocol.txt @@ -500,7 +500,7 @@ protocol. Identifying the protocol version is easy : - if the incoming byte count is 16 or above and the 13 first bytes match the protocol signature block followed by the protocol version 2 : - \x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A\x02 + \x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A\x20 - otherwise, if the incoming byte count is 8 or above, and the 5 first characters match the US-ASCII representation of "PROXY" then the protocol