]> git.kaiwu.me - nginx.git/commit
Reworked multi headers to use linked lists.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 30 May 2022 18:25:33 +0000 (21:25 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 30 May 2022 18:25:33 +0000 (21:25 +0300)
commit3aef1d693f3cc431563a7e6a6aba6a34e5290f03
treef926dcda083c18517266b4fd1fabbbe51fbf6f5f
parent7dc6f4e25d21588249691aab8c6013c126eae258
Reworked multi headers to use linked lists.

Multi headers are now using linked lists instead of arrays.  Notably,
the following fields were changed: r->headers_in.cookies (renamed
to r->headers_in.cookie), r->headers_in.x_forwarded_for,
r->headers_out.cache_control, r->headers_out.link, u->headers_in.cache_control
u->headers_in.cookies (renamed to u->headers_in.set_cookie).

The r->headers_in.cookies and u->headers_in.cookies fields were renamed
to r->headers_in.cookie and u->headers_in.set_cookie to match header names.

The ngx_http_parse_multi_header_lines() and ngx_http_parse_set_cookie_lines()
functions were changed accordingly.

With this change, multi headers are now essentially equivalent to normal
headers, and following changes will further make them equivalent.
17 files changed:
src/http/modules/ngx_http_geo_module.c
src/http/modules/ngx_http_geoip_module.c
src/http/modules/ngx_http_headers_filter_module.c
src/http/modules/ngx_http_proxy_module.c
src/http/modules/ngx_http_realip_module.c
src/http/modules/ngx_http_userid_filter_module.c
src/http/modules/perl/nginx.xs
src/http/ngx_http.h
src/http/ngx_http_core_module.c
src/http/ngx_http_core_module.h
src/http/ngx_http_parse.c
src/http/ngx_http_request.c
src/http/ngx_http_request.h
src/http/ngx_http_upstream.c
src/http/ngx_http_upstream.h
src/http/ngx_http_variables.c
src/http/v2/ngx_http_v2_filter_module.c