diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2010-05-14 09:56:37 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2010-05-14 09:56:37 +0000 |
| commit | 05b1a8f1e3595beab4397e25c2a6db9d832a6a97 (patch) | |
| tree | 282923e87cbaf9d634dab4a7c69ce85d602effcf /src/http/modules/ngx_http_gzip_static_module.c | |
| parent | 328df7a5cc91180fef3b1b58129e14bc79bef80b (diff) | |
| download | nginx-05b1a8f1e3595beab4397e25c2a6db9d832a6a97.tar.gz nginx-05b1a8f1e3595beab4397e25c2a6db9d832a6a97.tar.bz2 | |
ngx_str_set() and ngx_str_null()
Diffstat (limited to 'src/http/modules/ngx_http_gzip_static_module.c')
| -rw-r--r-- | src/http/modules/ngx_http_gzip_static_module.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/http/modules/ngx_http_gzip_static_module.c b/src/http/modules/ngx_http_gzip_static_module.c index 2098d8c43..0c6dbbb4a 100644 --- a/src/http/modules/ngx_http_gzip_static_module.c +++ b/src/http/modules/ngx_http_gzip_static_module.c @@ -212,12 +212,10 @@ ngx_http_gzip_static_handler(ngx_http_request_t *r) } 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->ignore_content_encoding = 1; /* we need to allocate all before the header would be sent */ |
