Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: fixed $upstream_status when upstream returns 503/504.

October 11, 2017 03:20PM
details: http://hg.nginx.org/nginx/rev/882ad033d43c
branches:
changeset: 7130:882ad033d43c
user: Ruslan Ermilov <ru@nginx.com>
date: Wed Oct 11 22:04:28 2017 +0300
description:
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:

src/http/ngx_http_upstream.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r f4cf4f970e6e -r 882ad033d43c src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Wed Oct 11 22:04:11 2017 +0300
+++ b/src/http/ngx_http_upstream.c Wed Oct 11 22:04:28 2017 +0300
@@ -4111,6 +4111,7 @@ ngx_http_upstream_next(ngx_http_request_
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_
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;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Upstream: fixed $upstream_status when upstream returns 503/504.

ru@nginx.com 815 October 11, 2017 03:20PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 272
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready