diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c index 21ee3bbd2..332fceb8a 100644 --- a/src/http/ngx_http_header_filter_module.c +++ b/src/http/ngx_http_header_filter_module.c @@ -357,6 +357,9 @@ ngx_http_header_filter(ngx_http_request_t *r) else #endif port = (port == 80) ? 0 : port; + + } else { + port = 0; } if (port) {