comparison src/http/modules/ngx_http_empty_gif_module.c @ 2508:aa5e003d30bf

set MIME-type length, otherwise ngx_http_test_content_type() did not find "image/gif"
author Igor Sysoev <igor@sysoev.ru>
date Tue, 17 Feb 2009 08:37:36 +0000
parents e114a16fc5be
children dd1570b6f237
comparison
equal deleted inserted replaced
2507:d2e9a60392c8 2508:aa5e003d30bf
120 120
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 r->headers_out.content_type.data = (u_char *) "image/gif"; 127 r->headers_out.content_type.data = (u_char *) "image/gif";
127 128
128 if (r->method == NGX_HTTP_HEAD) { 129 if (r->method == NGX_HTTP_HEAD) {
129 r->headers_out.status = NGX_HTTP_OK; 130 r->headers_out.status = NGX_HTTP_OK;