Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 5575:d15822784cf9
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>
author | Piotr Sikora <piotr@cloudflare.com> |
---|---|
date | Tue, 11 Feb 2014 21:54:42 -0800 |
parents | e7b3b9855be8 |
children | 3fb6615bb87f |
comparison
equal
deleted
inserted
replaced
5574:cff36d2d7fe6 | 5575:d15822784cf9 |
---|---|
1360 u->headers_in.connection_close = 1; | 1360 u->headers_in.connection_close = 1; |
1361 | 1361 |
1362 return NGX_OK; | 1362 return NGX_OK; |
1363 } | 1363 } |
1364 | 1364 |
1365 if (u->state) { | 1365 if (u->state && u->state->status == 0) { |
1366 u->state->status = ctx->status.code; | 1366 u->state->status = ctx->status.code; |
1367 } | 1367 } |
1368 | 1368 |
1369 u->headers_in.status_n = ctx->status.code; | 1369 u->headers_in.status_n = ctx->status.code; |
1370 | 1370 |