diff options
author | Piotr Sikora <piotr@cloudflare.com> | 2014-02-11 21:54:42 -0800 |
---|---|---|
committer | Piotr Sikora <piotr@cloudflare.com> | 2014-02-11 21:54:42 -0800 |
commit | 60d508ceb9c5ad867d33b819c9dfbdf05b9eef4b (patch) | |
tree | e0ea85fc89cfd2f3c3c71867c2653580d50a9b2b /src/http/modules/ngx_http_proxy_module.c | |
parent | cd358e5a95fb770f30207fffe8e45dbc2bb7e52b (diff) | |
download | nginx-60d508ceb9c5ad867d33b819c9dfbdf05b9eef4b.tar.gz nginx-60d508ceb9c5ad867d33b819c9dfbdf05b9eef4b.zip |
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 <piotr@cloudflare.com>
Diffstat (limited to 'src/http/modules/ngx_http_proxy_module.c')
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |