summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http.h
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2022-05-30 21:25:33 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2022-05-30 21:25:33 +0300
commit3aef1d693f3cc431563a7e6a6aba6a34e5290f03 (patch)
treef926dcda083c18517266b4fd1fabbbe51fbf6f5f /src/http/ngx_http.h
parent7dc6f4e25d21588249691aab8c6013c126eae258 (diff)
downloadnginx-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.h')
-rw-r--r--src/http/ngx_http.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/http/ngx_http.h b/src/http/ngx_http.h
index be8b7cd71..a7f312f41 100644
--- a/src/http/ngx_http.h
+++ b/src/http/ngx_http.h
@@ -103,10 +103,10 @@ ngx_int_t ngx_http_parse_unsafe_uri(ngx_http_request_t *r, ngx_str_t *uri,
ngx_str_t *args, ngx_uint_t *flags);
ngx_int_t ngx_http_parse_header_line(ngx_http_request_t *r, ngx_buf_t *b,
ngx_uint_t allow_underscores);
-ngx_int_t ngx_http_parse_multi_header_lines(ngx_array_t *headers,
- ngx_str_t *name, ngx_str_t *value);
-ngx_int_t ngx_http_parse_set_cookie_lines(ngx_array_t *headers,
- ngx_str_t *name, ngx_str_t *value);
+ngx_table_elt_t *ngx_http_parse_multi_header_lines(ngx_http_request_t *r,
+ ngx_table_elt_t *headers, ngx_str_t *name, ngx_str_t *value);
+ngx_table_elt_t *ngx_http_parse_set_cookie_lines(ngx_http_request_t *r,
+ ngx_table_elt_t *headers, ngx_str_t *name, ngx_str_t *value);
ngx_int_t ngx_http_arg(ngx_http_request_t *r, u_char *name, size_t len,
ngx_str_t *value);
void ngx_http_split_args(ngx_http_request_t *r, ngx_str_t *uri,