changeset 3012:f958084d4c12

fix segfault introduced in r3007
author Igor Sysoev <igor@sysoev.ru>
date Fri, 07 Aug 2009 13:16:42 +0000
parents 5957e869f04d
children 1cef1807bc12
files src/http/ngx_http_upstream.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2883,7 +2883,7 @@ ngx_http_upstream_finalize_request(ngx_h
 
 #if (NGX_HTTP_CACHE)
 
-    if (u->cacheable) {
+    if (u->cacheable && r->cache) {
         time_t  valid;
 
         ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,