Firstsawyou commented on a change in pull request #2817:
URL: https://github.com/apache/apisix/pull/2817#discussion_r529126522
##########
File path: apisix/init.lua
##########
@@ -629,6 +630,12 @@ end
function _M.http_header_filter_phase()
core.response.set_header("Server", ver_header)
+ local status_code = tonumber(get_var("upstream_status"))
Review comment:
I think there is a problem. When it comes to retries between upstreams
and all upstream services are unavailable, the value of `$upstream_status` is
nil. APISIX itself returns a 502 status code. I think this 502 status code
should be the status code of the upstream service.
This is the relevant test caseļ¼
https://github.com/apache/apisix/pull/2817/files#diff-8b1dc592c5a25c17fc62106ed68fd5b910eb584064cba052b1af9088d3e74ff5R286-R326
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]