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.
switch (ft_type) {
case NGX_HTTP_UPSTREAM_FT_TIMEOUT:
+ case NGX_HTTP_UPSTREAM_FT_HTTP_504:
status = NGX_HTTP_GATEWAY_TIME_OUT;
break;
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;