diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-05-27 21:23:34 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-05-27 21:23:34 +0000 |
| commit | 3b647f7b7031fb5421975c7edb713b3ee384454a (patch) | |
| tree | bedf54d4353aef8159ada33cfecced7475a055db | |
| parent | be786070972fda62081a706082138cd2c32779ae (diff) | |
| download | tipidee-3b647f7b7031fb5421975c7edb713b3ee384454a.tar.gz | |
Ignore Host: including for port information when absolute-form
| -rw-r--r-- | src/tipideed/tipideed.c | 10 |
1 files 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 */ |
