Mercurial > hg > nginx
comparison src/http/modules/ngx_http_headers_filter_module.c @ 8031:d26db4f82d7d
All known output headers can be linked lists now.
The h->next pointer properly provided as NULL in all cases where known
output headers are added.
Note that there are 3rd party modules which might not do this, and it
might be risky to rely on this for arbitrary headers.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 30 May 2022 21:25:45 +0300 |
parents | ef6a3a99a81a |
children | e64a1f32065b |
comparison
equal
deleted
inserted
replaced
8030:cdc2724858ca | 8031:d26db4f82d7d |
---|---|
360 if (e == NULL) { | 360 if (e == NULL) { |
361 return NGX_ERROR; | 361 return NGX_ERROR; |
362 } | 362 } |
363 | 363 |
364 r->headers_out.expires = e; | 364 r->headers_out.expires = e; |
365 e->next = NULL; | |
365 | 366 |
366 e->hash = 1; | 367 e->hash = 1; |
367 ngx_str_set(&e->key, "Expires"); | 368 ngx_str_set(&e->key, "Expires"); |
368 } | 369 } |
369 | 370 |
619 if (h == NULL) { | 620 if (h == NULL) { |
620 return NGX_ERROR; | 621 return NGX_ERROR; |
621 } | 622 } |
622 | 623 |
623 *old = h; | 624 *old = h; |
625 h->next = NULL; | |
624 } | 626 } |
625 | 627 |
626 h->hash = 1; | 628 h->hash = 1; |
627 h->key = hv->key; | 629 h->key = hv->key; |
628 h->value = *value; | 630 h->value = *value; |