From 3b647f7b7031fb5421975c7edb713b3ee384454a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 27 May 2026 21:23:34 +0000 Subject: Ignore Host: including for port information when absolute-form --- src/tipideed/tipideed.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/tipideed/tipideed.c b/src/tipideed/tipideed.c index 7ca5c0a..b5098af 100644 --- a/src/tipideed/tipideed.c +++ b/src/tipideed/tipideed.c @@ -513,14 +513,10 @@ int main (int argc, char const *const *argv, char const *const *envp) char *p = strchr(x, ':') ; if (p) { - uint16_t port ; - if (!uint160_scan(p+1, &port) || !port) eexit_400(&rql, "Invalid Host header") ; + if (!rql.uri.port) + if (!uint160_scan(p+1, &rql.uri.port) || !rql.uri.port) + eexit_400(&rql, "Invalid Host header") ; *p = 0 ; - if (rql.uri.port) - { - if (rql.uri.port != port) eexit_400(&rql, "Port mismatch between Request-Line and Host") ; - } - else rql.uri.port = port ; } if (!*x || *x == '.') eexit_400(&rql, "Invalid Host header") ; if (!rql.uri.host) rql.uri.host = x ; /* origin-form or HTTP/1.05 */ -- cgit v1.3.1