From 3a5956fa5237cbf853a13fb955c7f1498ec6c590 Mon Sep 17 00:00:00 2001 From: Pavel Zavadski Date: Mon, 13 May 2024 09:53:05 +0200 Subject: [PATCH] Added standard port for inet and inet6 Added a standard port for IPv4 and IPv6 addresses when using proxy and HTTP, eliminating the need to specify an additional port 80. This is defined by the RFC standards for HTTP. Currently Nginx Unit only uses HTTP connections for proxying, version 1.1. --- src/nxt_sockaddr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nxt_sockaddr.c b/src/nxt_sockaddr.c index 32941893d..5855f53d9 100644 --- a/src/nxt_sockaddr.c +++ b/src/nxt_sockaddr.c @@ -667,7 +667,7 @@ nxt_sockaddr_inet6_parse(nxt_mp_t *mp, nxt_str_t *addr) p = NULL; } - port = 0; + port = 80; if (p != NULL) { length = (start + length) - p; @@ -742,7 +742,7 @@ nxt_sockaddr_inet_parse(nxt_mp_t *mp, nxt_str_t *addr) } } - port = 0; + port = 80; if (p != NULL) { p++;