Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 2804:edc0cd9db5cf
proxy/fastcgi_cache_use_stale http_50x did not work
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 05 May 2009 15:17:00 +0000 |
parents | 4e002555652d |
children | 60551422e150 |
comparison
equal
deleted
inserted
replaced
2803:60758ab4e5f4 | 2804:edc0cd9db5cf |
---|---|
1473 ngx_http_upstream_test_next(ngx_http_request_t *r, ngx_http_upstream_t *u) | 1473 ngx_http_upstream_test_next(ngx_http_request_t *r, ngx_http_upstream_t *u) |
1474 { | 1474 { |
1475 ngx_uint_t status; | 1475 ngx_uint_t status; |
1476 ngx_http_upstream_next_t *un; | 1476 ngx_http_upstream_next_t *un; |
1477 | 1477 |
1478 if (!(u->conf->next_upstream & NGX_HTTP_UPSTREAM_FT_STATUS)) { | |
1479 return NGX_DECLINED; | |
1480 } | |
1481 | |
1482 status = u->headers_in.status_n; | 1478 status = u->headers_in.status_n; |
1483 | 1479 |
1484 for (un = ngx_http_upstream_next_errors; un->status; un++) { | 1480 for (un = ngx_http_upstream_next_errors; un->status; un++) { |
1485 | 1481 |
1486 if (status != un->status) { | 1482 if (status != un->status) { |
1492 return NGX_OK; | 1488 return NGX_OK; |
1493 } | 1489 } |
1494 | 1490 |
1495 #if (NGX_HTTP_CACHE) | 1491 #if (NGX_HTTP_CACHE) |
1496 | 1492 |
1497 if (u->peer.tries == 0 | 1493 if (u->stale_cache && (u->conf->cache_use_stale & un->mask)) { |
1498 && u->stale_cache | |
1499 && (u->conf->cache_use_stale & un->mask)) | |
1500 { | |
1501 ngx_http_upstream_finalize_request(r, u, | 1494 ngx_http_upstream_finalize_request(r, u, |
1502 ngx_http_upstream_cache_send(r, u)); | 1495 ngx_http_upstream_cache_send(r, u)); |
1503 return NGX_OK; | 1496 return NGX_OK; |
1504 } | 1497 } |
1505 | 1498 |