# HG changeset patch # User Vladimir Khomutov # Date 1701165434 -10800 # Node ID dacad3a9c7b8435a4c67ad2b67f261e7b4e36d8e # Parent f366007dd23a6ce8e8427c1b3042781b618a2ade HTTP: removed unused r->port_start and r->port_end. Neither r->port_start nor r->port_end were ever used. The r->port_end is set by the parser, though it was never used by the following code (and was never usable, since not copied by the ngx_http_alloc_large_header_buffer() without r->port_start set). diff -r f366007dd23a -r dacad3a9c7b8 src/http/ngx_http_parse.c --- a/src/http/ngx_http_parse.c Tue Nov 14 15:26:02 2023 +0400 +++ b/src/http/ngx_http_parse.c Tue Nov 28 12:57:14 2023 +0300 @@ -451,19 +451,16 @@ switch (ch) { case '/': - r->port_end = p; r->uri_start = p; state = sw_after_slash_in_uri; break; case '?': - r->port_end = p; r->uri_start = p; r->args_start = p + 1; r->empty_path_in_uri = 1; state = sw_uri; break; case ' ': - r->port_end = p; /* * use single "/" from request line to preserve pointers, * if request line will be copied to large client buffer diff -r f366007dd23a -r dacad3a9c7b8 src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c Tue Nov 14 15:26:02 2023 +0400 +++ b/src/http/ngx_http_request.c Tue Nov 28 12:57:14 2023 +0300 @@ -1735,11 +1735,6 @@ } } - if (r->port_start) { - r->port_start = new + (r->port_start - old); - r->port_end = new + (r->port_end - old); - } - if (r->uri_ext) { r->uri_ext = new + (r->uri_ext - old); } diff -r f366007dd23a -r dacad3a9c7b8 src/http/ngx_http_request.h --- a/src/http/ngx_http_request.h Tue Nov 14 15:26:02 2023 +0400 +++ b/src/http/ngx_http_request.h Tue Nov 28 12:57:14 2023 +0300 @@ -597,8 +597,6 @@ u_char *schema_end; u_char *host_start; u_char *host_end; - u_char *port_start; - u_char *port_end; unsigned http_minor:16; unsigned http_major:16;