]> git.kaiwu.me - haproxy.git/commitdiff
DOC: config: fix doc for hex2i() converter on unparsable input
authorWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 12:23:23 +0000 (14:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 14:11:24 +0000 (16:11 +0200)
The doc said the converter would return zero, which is wrong, it fails
to return (i.e. no confusion possible with zero).

doc/configuration.txt

index 7984fd4235a62a9a7b784b0f84e9777e31101e90..0122ea3016a1f7726d07e8c0e24b41642a9e7d83 100644 (file)
@@ -22063,7 +22063,9 @@ hex
 
 hex2i
   Converts a hex string containing two hex digits per input byte to an
-  integer. If the input value cannot be converted, then zero is returned.
+  integer. If the input value contains a character which is not a
+  hexadecimal digit, the converter fails and returns nothing, which makes it
+  possible to differentiate an invalid input from a valid zero.
 
 hmac(<algorithm>,<key>)
   Converts a binary input sample to a message authentication code with the given