summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-04-03 12:06:04 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-04-03 12:06:04 +0000
commit56f86505db90ad09ef7389c3c67923a4bf2a4ee3 (patch)
tree976122f5cf137aa4fd872c6c686f8484f8996b0b /src
parentca2bf870d8af43fffc5d0eaff1556d1ce18c38d3 (diff)
downloadnginx-56f86505db90ad09ef7389c3c67923a4bf2a4ee3.tar.gz
nginx-56f86505db90ad09ef7389c3c67923a4bf2a4ee3.tar.bz2
cache GET requests only
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 1ff6ae4f6..76f1bc3f8 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -531,6 +531,10 @@ 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)) {
+ return NGX_DECLINED;
+ }
+
c = ngx_pcalloc(r->pool, sizeof(ngx_http_cache_t));
if (c == NULL) {
return NGX_ERROR;