comparison src/http/modules/ngx_http_static_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 1bde031b59ff
children 1c3b78d7cdc9
comparison
equal deleted inserted replaced
8030:cdc2724858ca 8031:d26db4f82d7d
193 ngx_memcpy(++last, r->args.data, r->args.len); 193 ngx_memcpy(++last, r->args.data, r->args.len);
194 } 194 }
195 } 195 }
196 196
197 r->headers_out.location->hash = 1; 197 r->headers_out.location->hash = 1;
198 r->headers_out.location->next = NULL;
198 ngx_str_set(&r->headers_out.location->key, "Location"); 199 ngx_str_set(&r->headers_out.location->key, "Location");
199 r->headers_out.location->value.len = len; 200 r->headers_out.location->value.len = len;
200 r->headers_out.location->value.data = location; 201 r->headers_out.location->value.data = location;
201 202
202 return NGX_HTTP_MOVED_PERMANENTLY; 203 return NGX_HTTP_MOVED_PERMANENTLY;