Commit 053c7ac5 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Returns 408 if backend timed out before sending headers

parent 8a59ce6d
......@@ -1378,7 +1378,11 @@ int Http2Upstream::downstream_error(DownstreamConnection *dconn, int events) {
} else {
unsigned int status;
if (events & Downstream::EVENT_TIMEOUT) {
status = 504;
if (downstream->get_request_header_sent()) {
status = 504;
} else {
status = 408;
}
} else {
status = 502;
}
......
......@@ -893,7 +893,11 @@ int HttpsUpstream::downstream_error(DownstreamConnection *dconn, int events) {
unsigned int status;
if (events & Downstream::EVENT_TIMEOUT) {
status = 504;
if (downstream->get_request_header_sent()) {
status = 504;
} else {
status = 408;
}
} else {
status = 502;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment