Is ngx_http_headers_out dead code?

Sergey Kandaurov pluknet at nginx.com
Thu Jul 20 11:56:54 UTC 2023


> On 25 Jun 2023, at 11:25, 洪志道 <hongzhidao at gmail.com> wrote:
> 
> Hi,
> I wonder if the `ngx_http_headers_out` variable is being used? If yes, what is it for?
> 
> ```
> /* src/http/ngx_http_header_filter_module.c */
> 
>  ngx_http_header_out_t  ngx_http_headers_out[] = {
>      { ngx_string("Server"), offsetof(ngx_http_headers_out_t, server) },
>      { ngx_string("Date"), offsetof(ngx_http_headers_out_t, date) },
> @@ -151,6 +152,7 @@
> 
>      { ngx_null_string, 0 }
>  };
> ```
> 

It was used to support Apache LogFormat %{VARNAME}o syntax before 0.5.0.

-- 
Sergey Kandaurov


More information about the nginx-devel mailing list