summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_request.h
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2025-09-29 20:47:27 +0400
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>2025-10-23 18:40:05 +0400
commitc8c7beb96f61e2251abbc345357116131cf91c22 (patch)
tree5928dd85d6785404835a778045af0f973df05814 /src/http/ngx_http_request.h
parent78d1ab5a2c00839a36ff6bac661d9785fce3c1a4 (diff)
downloadnginx-c8c7beb96f61e2251abbc345357116131cf91c22.tar.gz
nginx-c8c7beb96f61e2251abbc345357116131cf91c22.tar.bz2
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.
Diffstat (limited to 'src/http/ngx_http_request.h')
-rw-r--r--src/http/ngx_http_request.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h
index ad11f147f..1b012f810 100644
--- a/src/http/ngx_http_request.h
+++ b/src/http/ngx_http_request.h
@@ -461,6 +461,8 @@ struct ngx_http_request_s {
ngx_http_cleanup_t *cleanup;
+ in_port_t port;
+
unsigned count:16;
unsigned subrequests:8;
unsigned blocked:8;