]> git.kaiwu.me - nginx.git/commitdiff
fix r2664: ..._cache_valid did not work for stale responses
authorIgor Sysoev <igor@sysoev.ru>
Fri, 3 Apr 2009 15:47:45 +0000 (15:47 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 3 Apr 2009 15:47:45 +0000 (15:47 +0000)
src/http/ngx_http_upstream.c

index be1ea10f4f28856fe9a039820739bf0f51edb423..f7d1072b200f4271e7b507a590e1d1126e786613 100644 (file)
@@ -581,6 +581,7 @@ ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u)
 
     } else if (rc == NGX_HTTP_CACHE_STALE) {
 
+        c->valid_sec = 0;
         u->stale_cache = 1;
         u->buffer.start = NULL;