Mercurial > hg > nginx-vendor-0-6
comparison src/http/modules/ngx_http_static_module.c @ 378:fc497c1dfb7c NGINX_0_6_33
nginx 0.6.33
*) Feature: now nginx returns the 405 status code for POST method
requesting a static file only if the file exists.
*) Workaround: compatibility with glibc 2.3.
Thanks to Eric Benson and Maxim Dounin.
*) Bugfix: the resolver did not understand big DNS responses.
Thanks to Zyb.
*) Bugfix: in HTTPS mode requests might fail with the "bad write retry"
error.
*) Bugfix: the ngx_http_charset_module did not understand quoted
charset name received from backend.
*) Bugfix: if the "max_fails=0" parameter was used in upstream with
several servers, then a worker process exited on a SIGFPE signal.
Thanks to Maxim Dounin.
*) Bugfix: the $r->header_in() method did not return value of the
"Host", "User-Agent", and "Connection" request header lines; the bug
had appeared in 0.6.32.
*) Bugfix: a full response was returned for request method HEAD while
redirection via an "error_page" directive.
*) Bugfix: if a directory has search only rights and the first index
file was absent, then nginx returned the 500 status code.
*) Bugfix: of recursive error_page for 500 status code.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 20 Nov 2008 00:00:00 +0300 |
parents | 54fad6c4b555 |
children | 3ce4580ae286 |
comparison
equal
deleted
inserted
replaced
377:15c4ba3bc2fa | 378:fc497c1dfb7c |
---|---|
56 ngx_buf_t *b; | 56 ngx_buf_t *b; |
57 ngx_chain_t out; | 57 ngx_chain_t out; |
58 ngx_open_file_info_t of; | 58 ngx_open_file_info_t of; |
59 ngx_http_core_loc_conf_t *clcf; | 59 ngx_http_core_loc_conf_t *clcf; |
60 | 60 |
61 if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD))) { | 61 if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD|NGX_HTTP_POST))) { |
62 return NGX_HTTP_NOT_ALLOWED; | 62 return NGX_HTTP_NOT_ALLOWED; |
63 } | 63 } |
64 | 64 |
65 if (r->uri.data[r->uri.len - 1] == '/') { | 65 if (r->uri.data[r->uri.len - 1] == '/') { |
66 return NGX_DECLINED; | 66 return NGX_DECLINED; |
67 } | 67 } |
68 | 68 |
69 /* TODO: Win32 */ | 69 /* TODO: Win32 */ |
70 if (r->zero_in_uri) { | 70 if (r->zero_in_uri) { |
71 return NGX_DECLINED; | 71 return NGX_DECLINED; |
72 } | |
73 | |
74 rc = ngx_http_discard_request_body(r); | |
75 | |
76 if (rc != NGX_OK) { | |
77 return rc; | |
78 } | 72 } |
79 | 73 |
80 log = r->connection->log; | 74 log = r->connection->log; |
81 | 75 |
82 /* | 76 /* |
184 return NGX_HTTP_NOT_FOUND; | 178 return NGX_HTTP_NOT_FOUND; |
185 } | 179 } |
186 | 180 |
187 #endif | 181 #endif |
188 | 182 |
183 if (r->method & NGX_HTTP_POST) { | |
184 return NGX_HTTP_NOT_ALLOWED; | |
185 } | |
186 | |
187 rc = ngx_http_discard_request_body(r); | |
188 | |
189 if (rc != NGX_OK) { | |
190 return rc; | |
191 } | |
192 | |
189 log->action = "sending response to client"; | 193 log->action = "sending response to client"; |
190 | 194 |
191 r->headers_out.status = NGX_HTTP_OK; | 195 r->headers_out.status = NGX_HTTP_OK; |
192 r->headers_out.content_length_n = of.size; | 196 r->headers_out.content_length_n = of.size; |
193 r->headers_out.last_modified_time = of.mtime; | 197 r->headers_out.last_modified_time = of.mtime; |