haproxy/reg-tests/checks
Christopher Faulet 8acb1284bc MINOR: checks: Add a way to send custom headers and payload during http chekcs
The 'http-check send' directive have been added to add headers and optionnaly a
payload to the request sent during HTTP healthchecks. The request line may be
customized by the "option httpchk" directive but there was not official way to
add extra headers. An old trick consisted to hide these headers at the end of
the version string, on the "option httpchk" line. And it was impossible to add
an extra payload with an "http-check expect" directive because of the
"Connection: close" header appended to the request (See issue #16 for details).

So to make things official and fully support payload additions, the "http-check
send" directive have been added :

    option httpchk POST /status HTTP/1.1

    http-check send hdr Content-Type "application/json;charset=UTF-8" \
        hdr X-test-1 value1 hdr X-test-2 value2 \
        body "{id: 1, field: \"value\"}"

When a payload is defined, the Content-Length header is automatically added. So
chunk-encoded requests are not supported yet. For now, there is no special
validity checks on the extra headers.

This patch is inspired by Kiran Gavali's work. It should fix the issue #16 and
as far as possible, it may be backported, at least as far as 1.8.
2020-04-27 09:39:37 +02:00
..
1be_40srv_odd_health_checks.vtc REGTEST: rename the reg test files. 2019-04-23 15:37:03 +02:00
4be_1srv_health_checks.vtc CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
4be_1srv_smtpchk_httpchk_layer47errors.vtc REGTEST: Make this reg test be Linux specific. 2019-04-30 11:56:52 +02:00
40be_2srv_odd_health_checks.vtc REGTEST: exclude osx and generic targets for 40be_2srv_odd_health_checks 2019-04-25 08:39:48 +02:00
common.pem REGTEST: Add a reg test for health-checks over SSL/TLS. 2019-01-08 10:10:18 +01:00
http-check-send.vtc MINOR: checks: Add a way to send custom headers and payload during http chekcs 2020-04-27 09:39:37 +02:00
http-monitor-uri.vtc MINOR: http-ana: Match on the path if the monitor-uri starts by a / 2020-02-18 16:29:29 +01:00
tcp-check_multiple_ports.vtc REGTESTS: server/cli_set_fqdn requires version 1.8 minimum 2019-10-22 13:06:59 +02:00
tls_health_checks.vtc REGTEST: extend the check duration on tls_health_checks and mark it slow 2019-05-17 17:16:20 +02:00