comparison src/http/modules/ngx_http_empty_gif_module.c @ 1547:e114a16fc5be

add time and length to a HEAD request
author Igor Sysoev <igor@sysoev.ru>
date Fri, 28 Sep 2007 09:48:25 +0000
parents fc73de3e8df0
children aa5e003d30bf
comparison
equal deleted inserted replaced
1546:2956fb9b7dcb 1547:e114a16fc5be
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.data = (u_char *) "image/gif"; 126 r->headers_out.content_type.data = (u_char *) "image/gif";
127 127
128 if (r->method == NGX_HTTP_HEAD) { 128 if (r->method == NGX_HTTP_HEAD) {
129 r->headers_out.status = NGX_HTTP_OK; 129 r->headers_out.status = NGX_HTTP_OK;
130 r->headers_out.content_length_n = sizeof(ngx_empty_gif);
131 r->headers_out.last_modified_time = 23349600;
130 132
131 return ngx_http_send_header(r); 133 return ngx_http_send_header(r);
132 } 134 }
133 135
134 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); 136 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t));