comparison src/http/ngx_http_request.h @ 8024:ef6a3a99a81a

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 30 May 2022 21:25:33 +0300
parents f8f6b9fee66a
children 8d0753760546
comparison
equal deleted inserted replaced
8023:08b3ea81ff5f 8024:ef6a3a99a81a
210 ngx_table_elt_t *authorization; 210 ngx_table_elt_t *authorization;
211 211
212 ngx_table_elt_t *keep_alive; 212 ngx_table_elt_t *keep_alive;
213 213
214 #if (NGX_HTTP_X_FORWARDED_FOR) 214 #if (NGX_HTTP_X_FORWARDED_FOR)
215 ngx_array_t x_forwarded_for; 215 ngx_table_elt_t *x_forwarded_for;
216 #endif 216 #endif
217 217
218 #if (NGX_HTTP_REALIP) 218 #if (NGX_HTTP_REALIP)
219 ngx_table_elt_t *x_real_ip; 219 ngx_table_elt_t *x_real_ip;
220 #endif 220 #endif
229 ngx_table_elt_t *destination; 229 ngx_table_elt_t *destination;
230 ngx_table_elt_t *overwrite; 230 ngx_table_elt_t *overwrite;
231 ngx_table_elt_t *date; 231 ngx_table_elt_t *date;
232 #endif 232 #endif
233 233
234 ngx_table_elt_t *cookie;
235
234 ngx_str_t user; 236 ngx_str_t user;
235 ngx_str_t passwd; 237 ngx_str_t passwd;
236
237 ngx_array_t cookies;
238 238
239 ngx_str_t server; 239 ngx_str_t server;
240 off_t content_length_n; 240 off_t content_length_n;
241 time_t keep_alive_n; 241 time_t keep_alive_n;
242 242
272 ngx_table_elt_t *accept_ranges; 272 ngx_table_elt_t *accept_ranges;
273 ngx_table_elt_t *www_authenticate; 273 ngx_table_elt_t *www_authenticate;
274 ngx_table_elt_t *expires; 274 ngx_table_elt_t *expires;
275 ngx_table_elt_t *etag; 275 ngx_table_elt_t *etag;
276 276
277 ngx_table_elt_t *cache_control;
278 ngx_table_elt_t *link;
279
277 ngx_str_t *override_charset; 280 ngx_str_t *override_charset;
278 281
279 size_t content_type_len; 282 size_t content_type_len;
280 ngx_str_t content_type; 283 ngx_str_t content_type;
281 ngx_str_t charset; 284 ngx_str_t charset;
282 u_char *content_type_lowcase; 285 u_char *content_type_lowcase;
283 ngx_uint_t content_type_hash; 286 ngx_uint_t content_type_hash;
284
285 ngx_array_t cache_control;
286 ngx_array_t link;
287 287
288 off_t content_length_n; 288 off_t content_length_n;
289 off_t content_offset; 289 off_t content_offset;
290 time_t date_time; 290 time_t date_time;
291 time_t last_modified_time; 291 time_t last_modified_time;