Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_gzip_filter_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 | 0c517d0cabe0 |
children | a08e8b3832ae |
comparison
equal
deleted
inserted
replaced
3515:76d252724db5 | 3516:dd1570b6f237 |
---|---|
283 if (h == NULL) { | 283 if (h == NULL) { |
284 return NGX_ERROR; | 284 return NGX_ERROR; |
285 } | 285 } |
286 | 286 |
287 h->hash = 1; | 287 h->hash = 1; |
288 h->key.len = sizeof("Content-Encoding") - 1; | 288 ngx_str_set(&h->key, "Content-Encoding"); |
289 h->key.data = (u_char *) "Content-Encoding"; | 289 ngx_str_set(&h->value, "gzip"); |
290 h->value.len = sizeof("gzip") - 1; | |
291 h->value.data = (u_char *) "gzip"; | |
292 | |
293 r->headers_out.content_encoding = h; | 290 r->headers_out.content_encoding = h; |
294 | 291 |
295 r->main_filter_need_in_memory = 1; | 292 r->main_filter_need_in_memory = 1; |
296 | 293 |
297 ngx_http_clear_content_length(r); | 294 ngx_http_clear_content_length(r); |