From a72e5cd23b28513e449c4312e7d512e97b5e6233 Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Wed, 11 Jun 2025 06:37:18 -0400 Subject: [PATCH] http: fix Host header usage in http1_target_fixup Type: fix Change-Id: I034d40872515dcb192ea5cdd244737fafdb12217 Signed-off-by: Matus Fabian --- src/plugins/http/http1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/http/http1.c b/src/plugins/http/http1.c index 5ecc1f52300..f7d79b89553 100644 --- a/src/plugins/http/http1.c +++ b/src/plugins/http/http1.c @@ -768,12 +768,12 @@ http1_target_fixup (http_conn_t *hc, http_req_t *req) HTTP_URL_SCHEME_HTTP; if (req->target_form == HTTP_TARGET_AUTHORITY_FORM || - req->connection_header_index == ~0) + req->host_header_index == ~0) return; /* authority fixup */ - host = vec_elt_at_index (req->headers, req->connection_header_index); - req->target_authority_offset = host->value_offset; + host = vec_elt_at_index (req->headers, req->host_header_index); + req->target_authority_offset = req->headers_offset + host->value_offset; req->target_authority_len = host->value_len; } -- 2.16.6