diff options
author | Ruslan Ermilov <ru@nginx.com> | 2017-10-11 22:04:28 +0300 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2017-10-11 22:04:28 +0300 |
commit | f1be23bc8aed6c6e6bbba1320d85a8943550b253 (patch) | |
tree | ed36c7e31da871173ccff52c21de9a1588526187 /src/http/ngx_http_upstream.c | |
parent | 211d20a23021a3d45608c6075a92c73319715620 (diff) | |
download | nginx-f1be23bc8aed6c6e6bbba1320d85a8943550b253.tar.gz nginx-f1be23bc8aed6c6e6bbba1320d85a8943550b253.zip |
Upstream: fixed $upstream_status when upstream returns 503/504.
If proxy_next_upstream includes http_503/http_504, and upstream
returns 503/504, $upstream_status converted this to 502 for any
values except the last one.
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r-- | src/http/ngx_http_upstream.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 2ea521b07..c29ee97d8 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -4111,6 +4111,7 @@ ngx_http_upstream_next(ngx_http_request_t *r, ngx_http_upstream_t *u, switch (ft_type) { case NGX_HTTP_UPSTREAM_FT_TIMEOUT: + case NGX_HTTP_UPSTREAM_FT_HTTP_504: status = NGX_HTTP_GATEWAY_TIME_OUT; break; @@ -4118,6 +4119,10 @@ ngx_http_upstream_next(ngx_http_request_t *r, ngx_http_upstream_t *u, status = NGX_HTTP_INTERNAL_SERVER_ERROR; break; + case NGX_HTTP_UPSTREAM_FT_HTTP_503: + status = NGX_HTTP_SERVICE_UNAVAILABLE; + break; + case NGX_HTTP_UPSTREAM_FT_HTTP_403: status = NGX_HTTP_FORBIDDEN; break; |