]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] checks: add support for HTTP contents lookup
authorWilly Tarreau <w@1wt.eu>
Tue, 16 Mar 2010 17:46:54 +0000 (18:46 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Oct 2010 17:04:31 +0000 (19:04 +0200)
commitbd741540d2a31da74b10dfffcbc9a9024cc11ef2
tree116f2e84222ea36429a421ae68148b1ceb987c97
parentb4c81e4c819ccdc1b720ed15a6d58d04b67f4e3e
[MEDIUM] checks: add support for HTTP contents lookup

This patch adds the "http-check expect [r]{string,status}" statements
which enable health checks based on whether the response status or body
to an HTTP request contains a string or matches a regex.

This probably is one of the oldest patches that remained unmerged. Over
the time, several people have contributed to it, among which FinalBSD
(first and second implementations), Nick Chalk (port to 1.4), Anze
Skerlavaj (tests and fixes), Cyril Bonté (general fixes), and of course
myself for the final fixes and doc during integration.

Some people already use an old version of this patch which has several
issues, among which the inability to search for a plain string that is
not at the beginning of the data, and the inability to look for response
contents that are provided in a second and subsequent recv() calls. But
since some configs are already deployed, it was quite important to ensure
a 100% compatible behaviour on the working cases.

Thus, that patch fixes the issues while maintaining config compatibility
with already deployed versions.

(cherry picked from commit b507c43a3ce9a8e8e4b770e52e4edc20cba4c37f)
doc/configuration.txt
include/types/proxy.h
src/cfgparse.c
src/checks.c