From 55646bd98eb38c5e54b53536732b984166f3b77b Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 18 Feb 2020 14:51:51 +0100 Subject: [PATCH] BUG/MINOR: http-ana: Matching on monitor-uri should be case-sensitive The monitor-uri should be case-sensitive. In reality, the scheme and the host part are case-insensitives and only the path is case-sensive. But concretely, since the start, the matching on the monitor-uri is case-sensitive. And it is probably the expected behavior of almost all users. This patch must be backported as far as 1.9. For HAProxy 2.0 and 1.9, it must be applied on src/proto_htx.c. (cherry picked from commit d27689e952b09e1222c04b4cb238dbb5d797a5f2) Signed-off-by: Christopher Faulet --- src/http_ana.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http_ana.c b/src/http_ana.c index a217071..c28907b 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -325,7 +325,7 @@ int http_wait_for_request(struct stream *s, struct channel *req, int an_bit) * the monitor-uri is defined by the frontend. */ if (unlikely((sess->fe->monitor_uri_len != 0) && - isteqi(htx_sl_req_uri(sl), ist2(sess->fe->monitor_uri, sess->fe->monitor_uri_len)))) { + isteq(htx_sl_req_uri(sl), ist2(sess->fe->monitor_uri, sess->fe->monitor_uri_len)))) { /* * We have found the monitor URI */ -- 1.7.10.4