]> git.kaiwu.me - nginx.git/commitdiff
proxy/fastcgi_cache_use_stale http_50x did not work
authorIgor Sysoev <igor@sysoev.ru>
Tue, 5 May 2009 15:17:00 +0000 (15:17 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 5 May 2009 15:17:00 +0000 (15:17 +0000)
src/http/ngx_http_upstream.c

index 2cf45625d85b0a1f3ec4e581d30e9a247d93cc3e..74c9b20f1dc55e88e6408a96ee9434191e3c0408 100644 (file)
@@ -1475,10 +1475,6 @@ ngx_http_upstream_test_next(ngx_http_request_t *r, ngx_http_upstream_t *u)
     ngx_uint_t                 status;
     ngx_http_upstream_next_t  *un;
 
-    if (!(u->conf->next_upstream & NGX_HTTP_UPSTREAM_FT_STATUS)) {
-        return NGX_DECLINED;
-    }
-
     status = u->headers_in.status_n;
 
     for (un = ngx_http_upstream_next_errors; un->status; un++) {
@@ -1494,10 +1490,7 @@ ngx_http_upstream_test_next(ngx_http_request_t *r, ngx_http_upstream_t *u)
 
 #if (NGX_HTTP_CACHE)
 
-        if (u->peer.tries == 0
-            && u->stale_cache
-            && (u->conf->cache_use_stale & un->mask))
-        {
+        if (u->stale_cache && (u->conf->cache_use_stale & un->mask)) {
             ngx_http_upstream_finalize_request(r, u,
                                            ngx_http_upstream_cache_send(r, u));
             return NGX_OK;