]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: proxy-protocol: fix wrong byte in provided example
authorWilly Tarreau <w@1wt.eu>
Sun, 12 Feb 2023 08:26:48 +0000 (09:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 12 Feb 2023 08:26:48 +0000 (09:26 +0100)
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.

doc/proxy-protocol.txt

index 4d49d5cd1c00a6b55b4b2fc3e1efe66e0413d30b..fac03317690c194860a8b827afccc9a3a0b40480 100644 (file)
@@ -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