Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_empty_gif_module.c @ 1471:fc73de3e8df0
response to the HEAD request should be a header only
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 11 Sep 2007 06:34:18 +0000 |
parents | aabbf66b61ea |
children | e114a16fc5be |
comparison
equal
deleted
inserted
replaced
1470:92b5f20d54f4 | 1471:fc73de3e8df0 |
---|---|
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; |