]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: sample: rename the "len" converter to "length"
authorWilly Tarreau <w@1wt.eu>
Fri, 15 Dec 2017 06:13:48 +0000 (07:13 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 15 Dec 2017 06:13:48 +0000 (07:13 +0100)
commit60a2ee79453681822beb31864b028af66dcf4b0a
treee005f50a60efb9b5ab17ca84f8efb770d4a2bdd9
parent9fc9e53763f0bda431879ceaef3968bf1f43509e
MINOR: sample: rename the "len" converter to "length"

This converter was recently introduced by commit ed0d24e ("MINOR:
sample: add len converter").

As found by Cyril, it causes an issue in "http-request capture"
statements. The non-obvious problem is that an old syntax for sample
expressions and converters used to support a series of words, each
representing a converter. This used to be how the "stick" directives
were created initially. By having a converter called "len", a
statement such as "http-request capture foo len 10" considers "len"
as a converter and not as the capture length.

This obsolete syntax needs to be changed in 1.9 but it's too late
for other versions. It's worth noting that the same problem can
happen if converters are registered on the fly using Lua. Other
language keywords that currently have to be avoided in converters
include "id", "table", "if", "unless".
doc/configuration.txt
src/sample.c