diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2022-05-30 21:25:33 +0300 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2022-05-30 21:25:33 +0300 |
| commit | 3aef1d693f3cc431563a7e6a6aba6a34e5290f03 (patch) | |
| tree | f926dcda083c18517266b4fd1fabbbe51fbf6f5f /src/http/ngx_http_request.h | |
| parent | 7dc6f4e25d21588249691aab8c6013c126eae258 (diff) | |
| download | nginx-3aef1d693f3cc431563a7e6a6aba6a34e5290f03.tar.gz nginx-3aef1d693f3cc431563a7e6a6aba6a34e5290f03.tar.bz2 | |
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.
Diffstat (limited to 'src/http/ngx_http_request.h')
| -rw-r--r-- | src/http/ngx_http_request.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h index 52165793a..8c9eed249 100644 --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -212,7 +212,7 @@ typedef struct { ngx_table_elt_t *keep_alive; #if (NGX_HTTP_X_FORWARDED_FOR) - ngx_array_t x_forwarded_for; + ngx_table_elt_t *x_forwarded_for; #endif #if (NGX_HTTP_REALIP) @@ -231,11 +231,11 @@ typedef struct { ngx_table_elt_t *date; #endif + ngx_table_elt_t *cookie; + ngx_str_t user; ngx_str_t passwd; - ngx_array_t cookies; - ngx_str_t server; off_t content_length_n; time_t keep_alive_n; @@ -274,6 +274,9 @@ typedef struct { ngx_table_elt_t *expires; ngx_table_elt_t *etag; + ngx_table_elt_t *cache_control; + ngx_table_elt_t *link; + ngx_str_t *override_charset; size_t content_type_len; @@ -282,9 +285,6 @@ typedef struct { u_char *content_type_lowcase; ngx_uint_t content_type_hash; - ngx_array_t cache_control; - ngx_array_t link; - off_t content_length_n; off_t content_offset; time_t date_time; |
