mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-25 12:28:01 +00:00
BUG/MINOR: stats: properly check the path and not the whole URI
Since we now have full URIs with h2, stats may fail to work over H2 so we must carefully only check the path there if the stats URI was passed with a path only. This way it remains possible to intercept proxy requests to report stats on explicit domains but it continues to work as expected on origin requests. No backport needed.
This commit is contained in:
parent
cab2295ae7
commit
1eb3b4828e
@ -4340,6 +4340,8 @@ static int http_stats_check_uri(struct stream *s, struct http_txn *txn, struct p
|
||||
htx = htxbuf(&s->req.buf);
|
||||
sl = http_get_stline(htx);
|
||||
uri = htx_sl_req_uri(sl);
|
||||
if (*uri_auth->uri_prefix == '/')
|
||||
uri = http_get_path(uri);
|
||||
|
||||
/* check URI size */
|
||||
if (uri_auth->uri_len > uri.len)
|
||||
|
Loading…
Reference in New Issue
Block a user