]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http-ana: Matching on monitor-uri should be case-sensitive
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 18 Feb 2020 13:51:51 +0000 (14:51 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 18 Feb 2020 15:29:23 +0000 (16:29 +0100)
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.

src/http_ana.c

index 7ff474e3d76c199ae54a0c4ddedbfe87cbb82d15..57cb73f2aeae97ea8f9925a486d3d676943b64c4 100644 (file)
@@ -324,7 +324,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
                 */