Mercurial > hg > nginx
comparison src/http/modules/ngx_http_empty_gif_module.c @ 1529:93176ec9a9fc stable-0.5
r1472 merge:
response to the HEAD request should be a header only
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 23 Sep 2007 19:24:13 +0000 |
parents | c136df6c5ff0 |
children | a0ec4734d2e9 |
comparison
equal
deleted
inserted
replaced
1528:4699bab788c0 | 1529:93176ec9a9fc |
---|---|
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 | 130 |
131 rc = ngx_http_send_header(r); | 131 return ngx_http_send_header(r); |
132 | |
133 if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { | |
134 return rc; | |
135 } | |
136 } | 132 } |
137 | 133 |
138 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); | 134 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); |
139 if (b == NULL) { | 135 if (b == NULL) { |
140 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 136 return NGX_HTTP_INTERNAL_SERVER_ERROR; |