mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04: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
1 changed files with 2 additions and 0 deletions
|
|
@ -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 a new issue