]> git.kaiwu.me - nginx.git/commit
Added $request_port and $is_request_port variables.
authorRoman Arutyunyan <arut@nginx.com>
Mon, 29 Sep 2025 16:47:27 +0000 (20:47 +0400)
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>
Thu, 23 Oct 2025 14:40:05 +0000 (18:40 +0400)
commitc8c7beb96f61e2251abbc345357116131cf91c22
tree5928dd85d6785404835a778045af0f973df05814
parent78d1ab5a2c00839a36ff6bac661d9785fce3c1a4
Added $request_port and $is_request_port variables.

The $request_port variable contains the port passed by the client in the
request line (for HTTP/1.x) or ":authority" pseudo-header (for HTTP/2 and
HTTP/3).  If the request line contains no host, or ":authority" is missing,
then $request_port is taken from the "Host" header, similar to the $host
variable.

The $is_request_port variable contains ":" if $request_port is non-empty,
and is empty otherwise.
src/http/ngx_http_parse.c
src/http/ngx_http_request.c
src/http/ngx_http_request.h
src/http/ngx_http_variables.c
src/http/v2/ngx_http_v2.c
src/http/v3/ngx_http_v3_request.c