]> git.kaiwu.me - nginx.git/commitdiff
fix segfault introduced in r3007
authorIgor Sysoev <igor@sysoev.ru>
Fri, 7 Aug 2009 13:16:42 +0000 (13:16 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 7 Aug 2009 13:16:42 +0000 (13:16 +0000)
src/http/ngx_http_upstream.c

index 23cf1b605181e04f59d5dcbcda16e44d5ac5bfc3..e705da6c246760e9ec686c94d879a81f28df5df8 100644 (file)
@@ -2883,7 +2883,7 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r,
 
 #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,