Mercurial > hg > nginx
diff src/http/ngx_http_upstream.c @ 2875:6e1941b321b7
proxy_cache_methods and fastcgi_cache_methods
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 19 May 2009 13:27:27 +0000 |
parents | e16e03d62435 |
children | 896db5a09bd2 |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -329,6 +329,15 @@ static ngx_http_upstream_next_t ngx_htt { 0, 0 } }; + +ngx_conf_bitmask_t ngx_http_upstream_cache_method_mask[] = { + { ngx_string("GET"), NGX_HTTP_GET}, + { ngx_string("HEAD"), NGX_HTTP_HEAD }, + { ngx_string("POST"), NGX_HTTP_POST }, + { ngx_null_string, 0 } +}; + + void ngx_http_upstream_init(ngx_http_request_t *r) { @@ -532,7 +541,7 @@ ngx_http_upstream_cache(ngx_http_request ngx_int_t rc; ngx_http_cache_t *c; - if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD))) { + if (!(r->method & u->conf->cache_methods)) { return NGX_DECLINED; }