mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 10:38:53 +08:00
nghttpx: Pass through NGHTTP2_NO_ERROR from downstream to upstream
This commit is contained in:
@@ -539,12 +539,14 @@ namespace {
|
|||||||
nghttp2_error_code infer_upstream_rst_stream_error_code
|
nghttp2_error_code infer_upstream_rst_stream_error_code
|
||||||
(nghttp2_error_code downstream_error_code)
|
(nghttp2_error_code downstream_error_code)
|
||||||
{
|
{
|
||||||
// Only propagate NGHTTP2_REFUSED_STREAM so that upstream client
|
// NGHTTP2_REFUSED_STREAM is important because it tells upstream
|
||||||
// can resend request.
|
// client to retry.
|
||||||
if(downstream_error_code != NGHTTP2_REFUSED_STREAM) {
|
switch(downstream_error_code) {
|
||||||
return NGHTTP2_INTERNAL_ERROR;
|
case NGHTTP2_NO_ERROR:
|
||||||
} else {
|
case NGHTTP2_REFUSED_STREAM:
|
||||||
return downstream_error_code;
|
return downstream_error_code;
|
||||||
|
default:
|
||||||
|
return NGHTTP2_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
Reference in New Issue
Block a user