From 60d508ceb9c5ad867d33b819c9dfbdf05b9eef4b Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Tue, 11 Feb 2014 21:54:42 -0800 Subject: Upstream: fix $upstream_status variable. Previously, upstream's status code was overwritten with cached response's status code when STALE or REVALIDATED response was sent to the client. Signed-off-by: Piotr Sikora --- src/http/modules/ngx_http_proxy_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/http/modules/ngx_http_proxy_module.c') diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 93469984c..8ee32f491 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -1362,7 +1362,7 @@ ngx_http_proxy_process_status_line(ngx_http_request_t *r) return NGX_OK; } - if (u->state) { + if (u->state && u->state->status == 0) { u->state->status = ctx->status.code; } -- cgit