diff --git a/source/common/http/http2/codec_impl.cc b/source/common/http/http2/codec_impl.cc index aa9a75b8216d..bfeb546128c9 100644 --- a/source/common/http/http2/codec_impl.cc +++ b/source/common/http/http2/codec_impl.cc @@ -1488,7 +1488,6 @@ Status ConnectionImpl::onStreamClose(StreamImpl* stream, uint32_t error_code) { } else if (stream->defer_processing_backedup_streams_ && !stream->reset_reason_.has_value() && stream->stream_manager_.hasBufferedBodyOrTrailers()) { - ASSERT(error_code == NGHTTP2_NO_ERROR); ENVOY_CONN_LOG(debug, "buffered onStreamClose for stream: {}", connection_, stream_id); // Buffer the call, rely on the stream->process_buffered_data_callback_ // to end up invoking. diff --git a/test/common/http/codec_impl_corpus/content_length_mismatch-5806467830579200 b/test/common/http/codec_impl_corpus/content_length_mismatch-5806467830579200 new file mode 100644 index 000000000000..0a6023784b77 --- /dev/null +++ b/test/common/http/codec_impl_corpus/content_length_mismatch-5806467830579200 @@ -0,0 +1,206 @@ +actions { + new_stream { + request_headers { + headers { + key: ":method" + value: "GET" + } + headers { + key: ":path" + value: "/" + } + headers { + key: ":scheme" + value: "http" + } + headers { + key: ":authority" + value: "K" + } + headers { + key: "blah" + value: "nosniff" + } + headers { + key: "ckie" + value: "/" + } + headers { + key: "cookie" + value: "foo2=bar2" + } + } + } +} +actions { + stream_action { + stream_id: 54 + request { + data: 3000000 + } + } +} +actions { + server_drain { + } +} +actions { + quiesce_drain { + } +} +actions { + mutate { + value: 989855744 + } +} +actions { + stream_action { + stream_id: 1 + response { + headers { + headers { + key: "content-length" + value: "5" + } + } + } + } +} +actions { + stream_action { + response { + read_disable: true + } + } +} +actions { + client_drain { + } +} +actions { + stream_action { + request { + read_disable: false + } + } +} +actions { + stream_action { + request { + data: 5 + end_stream: true + } + } +} +actions { + stream_action { + response { + trailers { + } + } + } +} +actions { + stream_action { + stream_id: 67108864 + request { + read_disable: true + end_stream: true + } + } +} +actions { + stream_action { + response { + trailers { + } + } + } +} +actions { + new_stream { + request_headers { + headers { + key: ":method" + } + headers { + key: ":path" + value: "/" + } + headers { + key: ":scheme" + value: "http" + } + headers { + key: ":authority" + value: "foo.com" + } + headers { + key: "blah" + value: "nosniff" + } + headers { + key: "http" + value: "foo=bar" + } + headers { + key: "cookie" + value: "foo2=bar2" + } + } + } +} +actions { + stream_action { + stream_id: 1 + request { + data: 0 + } + } +} +actions { + stream_action { + stream_id: 1 + request { + data: 54 + } + } +} +actions { + quiesce_drain { + } +} +actions { + stream_action { + stream_id: 1 + request { + data: 54 + } + } +} +actions { + stream_action { + stream_id: 1 + response { + headers { + headers { + key: ":status" + value: "200" + } + headers { + key: "content-length" + value: "5" + } + } + } + } +} +actions { + stream_action { + stream_id: 1 + response { + data: 5 + end_stream: true + } + } +}