Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
3515:76d252724db5 | 3516:dd1570b6f237 |
---|---|
210 if (h == NULL) { | 210 if (h == NULL) { |
211 return NGX_ERROR; | 211 return NGX_ERROR; |
212 } | 212 } |
213 | 213 |
214 h->hash = 1; | 214 h->hash = 1; |
215 h->key.len = sizeof("Content-Encoding") - 1; | 215 ngx_str_set(&h->key, "Content-Encoding"); |
216 h->key.data = (u_char *) "Content-Encoding"; | 216 ngx_str_set(&h->value, "gzip"); |
217 h->value.len = sizeof("gzip") - 1; | |
218 h->value.data = (u_char *) "gzip"; | |
219 | |
220 r->headers_out.content_encoding = h; | 217 r->headers_out.content_encoding = h; |
218 | |
221 r->ignore_content_encoding = 1; | 219 r->ignore_content_encoding = 1; |
222 | 220 |
223 /* we need to allocate all before the header would be sent */ | 221 /* we need to allocate all before the header would be sent */ |
224 | 222 |
225 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); | 223 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); |