diff src/http/ngx_http_upstream.c @ 2927:55ceaef03d34

proxy_cache_use_stale/fastcgi_cache_use_stale updating
author Igor Sysoev <igor@sysoev.ru>
date Sat, 06 Jun 2009 18:49:47 +0000
parents 80a314b63c56
children 37b7cd336fdf
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -580,6 +580,15 @@ ngx_http_upstream_cache(ngx_http_request
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                    "http upstream cache: %i", rc);
 
+    if (rc == NGX_HTTP_CACHE_UPDATING) {
+        if (u->conf->cache_use_stale & NGX_HTTP_UPSTREAM_FT_UPDATING) {
+            rc = NGX_OK;
+
+        } else {
+            rc = NGX_HTTP_CACHE_STALE;
+        }
+    }
+
     if (rc == NGX_OK) {
 
         rc = ngx_http_upstream_cache_send(r, u);