]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cfgparse/server: try to fix spelling mistakes on server lines
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Mar 2021 08:58:04 +0000 (09:58 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Mar 2021 13:13:21 +0000 (14:13 +0100)
commit49c2b45c1d141ac63c4efae1541b5c8e2f61e520
tree70fddddc036a606c41d1eb6800b9ea3451ae96b6
parenta0e8eb8caaf1632500bab0dfe0c017540d0d71cb
MINOR: cfgparse/server: try to fix spelling mistakes on server lines

Let's apply the fuzzy match to server keywords so that we can avoid
dumping the huge list of supported keywords each time there is a spelling
mistake, and suggest proper spelling instead:

  $ printf "listen f\nserver s 0 sendpx-v2\n" | ./haproxy -c -f /dev/stdin
  [NOTICE] 070/095718 (24152) : haproxy version is 2.4-dev11-caa6e3-25
  [NOTICE] 070/095718 (24152) : path to executable is ./haproxy
  [ALERT] 070/095718 (24152) : parsing [/dev/stdin:2] : 'server s' unknown keyword 'sendpx-v2'; did you mean 'send-proxy-v2' maybe ?
  [ALERT] 070/095718 (24152) : Error(s) found in configuration file : /dev/stdin
  [ALERT] 070/095718 (24152) : Fatal errors found in configuration.
src/server.c