Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 3706:ea908f6ae499
an intercepted error code was not cached
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 19 Jul 2010 15:31:46 +0000 |
parents | 7ac6757fa391 |
children | c1385a3b8093 |
comparison
equal
deleted
inserted
replaced
3705:7ac6757fa391 | 3706:ea908f6ae499 |
---|---|
1718 *h = *u->headers_in.www_authenticate; | 1718 *h = *u->headers_in.www_authenticate; |
1719 | 1719 |
1720 r->headers_out.www_authenticate = h; | 1720 r->headers_out.www_authenticate = h; |
1721 } | 1721 } |
1722 | 1722 |
1723 #if (NGX_HTTP_CACHE) | |
1724 | |
1725 if (u->cacheable && r->cache) { | |
1726 time_t valid; | |
1727 | |
1728 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | |
1729 "http upstream cache fd: %d", r->cache->file.fd); | |
1730 | |
1731 valid = ngx_http_file_cache_valid(u->conf->cache_valid, status); | |
1732 | |
1733 if (valid) { | |
1734 r->cache->valid_sec = ngx_time() + valid; | |
1735 r->cache->error = status; | |
1736 } | |
1737 | |
1738 ngx_http_file_cache_free(r, u->pipe->temp_file); | |
1739 } | |
1740 #endif | |
1723 ngx_http_upstream_finalize_request(r, u, status); | 1741 ngx_http_upstream_finalize_request(r, u, status); |
1724 | 1742 |
1725 return NGX_OK; | 1743 return NGX_OK; |
1726 } | 1744 } |
1727 } | 1745 } |