summaryrefslogtreecommitdiffhomepage
path: root/src/http/v3
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/v3')
-rw-r--r--src/http/v3/ngx_http_v3_request.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
index 844a4000a..77c55bfee 100644
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -979,6 +979,16 @@ ngx_http_v3_init_pseudo_headers(ngx_http_request_t *r)
}
r->headers_in.server = host;
+
+ p = ngx_strlchr(r->host_start + host.len, r->host_end, ':');
+
+ if (p) {
+ rc = ngx_atoi(p + 1, r->host_end - p - 1);
+
+ if (rc > 0 && rc < 65536) {
+ r->port = rc;
+ }
+ }
}
if (ngx_list_init(&r->headers_in.headers, r->pool, 20,