comparison src/http/modules/ngx_http_gzip_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 c297c2c252d8
children fcb2333c9982
comparison
equal deleted inserted replaced
8030:cdc2724858ca 8031:d26db4f82d7d
278 if (h == NULL) { 278 if (h == NULL) {
279 return NGX_ERROR; 279 return NGX_ERROR;
280 } 280 }
281 281
282 h->hash = 1; 282 h->hash = 1;
283 h->next = NULL;
283 ngx_str_set(&h->key, "Content-Encoding"); 284 ngx_str_set(&h->key, "Content-Encoding");
284 ngx_str_set(&h->value, "gzip"); 285 ngx_str_set(&h->value, "gzip");
285 r->headers_out.content_encoding = h; 286 r->headers_out.content_encoding = h;
286 287
287 r->main_filter_need_in_memory = 1; 288 r->main_filter_need_in_memory = 1;