Mercurial > hg > nginx
diff src/http/modules/ngx_http_gzip_static_module.c @ 3516:dd1570b6f237
ngx_str_set() and ngx_str_null()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 14 May 2010 09:56:37 +0000 |
parents | 9f20a6e758c3 |
children | 84905c7b2aa7 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_gzip_static_module.c Fri May 14 09:55:33 2010 +0000 +++ b/src/http/modules/ngx_http_gzip_static_module.c Fri May 14 09:56:37 2010 +0000 @@ -212,12 +212,10 @@ } h->hash = 1; - h->key.len = sizeof("Content-Encoding") - 1; - h->key.data = (u_char *) "Content-Encoding"; - h->value.len = sizeof("gzip") - 1; - h->value.data = (u_char *) "gzip"; + ngx_str_set(&h->key, "Content-Encoding"); + ngx_str_set(&h->value, "gzip"); + r->headers_out.content_encoding = h; - r->headers_out.content_encoding = h; r->ignore_content_encoding = 1; /* we need to allocate all before the header would be sent */