proxy/fastcgi_cache_use_stale http_50x did not work
Igor Sysoev
13 years ago
1474 | 1474 | ngx_uint_t status; |
1475 | 1475 | ngx_http_upstream_next_t *un; |
1476 | 1476 | |
1477 | if (!(u->conf->next_upstream & NGX_HTTP_UPSTREAM_FT_STATUS)) { | |
1478 | return NGX_DECLINED; | |
1479 | } | |
1480 | ||
1481 | 1477 | status = u->headers_in.status_n; |
1482 | 1478 | |
1483 | 1479 | for (un = ngx_http_upstream_next_errors; un->status; un++) { |
1493 | 1489 | |
1494 | 1490 | #if (NGX_HTTP_CACHE) |
1495 | 1491 | |
1496 | if (u->peer.tries == 0 | |
1497 | && u->stale_cache | |
1498 | && (u->conf->cache_use_stale & un->mask)) | |
1499 | { | |
1492 | if (u->stale_cache && (u->conf->cache_use_stale & un->mask)) { | |
1500 | 1493 | ngx_http_upstream_finalize_request(r, u, |
1501 | 1494 | ngx_http_upstream_cache_send(r, u)); |
1502 | 1495 | return NGX_OK; |