aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_upstream.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-05-19 13:27:27 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-05-19 13:27:27 +0000
commit5ed3691b6e252d0612f96f50a992b6e1982f350d (patch)
treebacc9fb1ae5a1abf16b39373dcb547325d04f1a0 /src/http/ngx_http_upstream.c
parent980491302ba124377c8d379fb9a4c411b0cbab6d (diff)
downloadnginx-5ed3691b6e252d0612f96f50a992b6e1982f350d.tar.gz
nginx-5ed3691b6e252d0612f96f50a992b6e1982f350d.zip
proxy_cache_methods and fastcgi_cache_methods
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r--src/http/ngx_http_upstream.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 9d86914e2..d789d6cb9 100644
--- 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_http_upstream_next_errors[] = {
{ 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_t *r, ngx_http_upstream_t *u)
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;
}