Mercurial > hg > nginx
comparison src/http/modules/ngx_http_empty_gif_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 | aa5e003d30bf |
children | c0113b6648de |
comparison
equal
deleted
inserted
replaced
3515:76d252724db5 | 3516:dd1570b6f237 |
---|---|
121 if (rc != NGX_OK) { | 121 if (rc != NGX_OK) { |
122 return rc; | 122 return rc; |
123 } | 123 } |
124 | 124 |
125 r->headers_out.content_type_len = sizeof("image/gif") - 1; | 125 r->headers_out.content_type_len = sizeof("image/gif") - 1; |
126 r->headers_out.content_type.len = sizeof("image/gif") - 1; | 126 ngx_str_set(&r->headers_out.content_type, "image/gif"); |
127 r->headers_out.content_type.data = (u_char *) "image/gif"; | |
128 | 127 |
129 if (r->method == NGX_HTTP_HEAD) { | 128 if (r->method == NGX_HTTP_HEAD) { |
130 r->headers_out.status = NGX_HTTP_OK; | 129 r->headers_out.status = NGX_HTTP_OK; |
131 r->headers_out.content_length_n = sizeof(ngx_empty_gif); | 130 r->headers_out.content_length_n = sizeof(ngx_empty_gif); |
132 r->headers_out.last_modified_time = 23349600; | 131 r->headers_out.last_modified_time = 23349600; |