From af24f8394e43f46294df999963e9d29f1529577a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 17 Jan 2015 21:35:36 +0900 Subject: [PATCH] nghttpx: Fix nghttp2 error code use in SPDY upstream --- src/shrpx_spdy_upstream.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shrpx_spdy_upstream.cc b/src/shrpx_spdy_upstream.cc index 92f32b98..1a3aa328 100644 --- a/src/shrpx_spdy_upstream.cc +++ b/src/shrpx_spdy_upstream.cc @@ -642,14 +642,16 @@ int SpdyUpstream::downstream_error(DownstreamConnection *dconn, int events) { // stream, we don't have to do anything since response was // complete. if (downstream->get_upgraded()) { - rst_stream(downstream, NGHTTP2_NO_ERROR); + // We want "NO_ERROR" error code but SPDY does not have such + // code for RST_STREAM. + rst_stream(downstream, SPDYLAY_INTERNAL_ERROR); } } else { if (downstream->get_response_state() == Downstream::HEADER_COMPLETE) { if (downstream->get_upgraded()) { on_downstream_body_complete(downstream); } else { - rst_stream(downstream, NGHTTP2_INTERNAL_ERROR); + rst_stream(downstream, SPDYLAY_INTERNAL_ERROR); } } else { unsigned int status;