MINOR: http-ana: Match on the path if the monitor-uri starts by a /
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 18 Feb 2020 14:34:58 +0000 (15:34 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 21 Feb 2020 10:23:18 +0000 (11:23 +0100)
commite53de2da22aa39ad10b642ca50322a85f2331644
treed29d294e1349d03bdc46b8745ac7213f669828c0
parent55646bd98eb38c5e54b53536732b984166f3b77b
MINOR: http-ana: Match on the path if the monitor-uri starts by a /

if the monitor-uri starts by a slash ('/'), the matching is performed against
the request's path instead of the request's uri. It is a workaround to let the
HTTP/2 requests match the monitor-uri. Indeed, in HTTP/2, clients are encouraged
to send absolute URIs only.

This patch is not tagged as a bug, because the previous behavior matched exactly
what the doc describes. But it may surprise that HTTP/2 requests don't match the
monitor-uri.

This patch may be backported to 2.1 because URIs of HTTP/2 are stored using the
absolute-form starting this version. For previous versions, this patch will only
helps explicitely absolute HTTP/1 requests (and only the HTX part because on the
legacy HTTP, all the URI is matched).

It should fix the issue #509.

(cherry picked from commit 6072beb214d04ee2344872e100f4fdc480dd2496)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
doc/configuration.txt
reg-tests/checks/http-monitor-uri.vtc [new file with mode: 0644]
src/http_ana.c