Check for the data_deferred state before writing data for a stream. A stream should not write if its data was previously deferred. (The application can mark a stream's data as not deferred by resuming the stream.) This added check allows Http2CodecImplTest.MultipleContinueHeaders (and possibly other tests) to pass with oghttp2. blaze test //third_party/envoy/src/test/common/http/http2:codec_impl_test --test_filter=*/Http2CodecImplTest.MultipleContinueHeaders/* --test_arg=--vmodule=oghttp2_session=2 --test_arg=--log_backtrace_at=codec_impl.cc:48 --test_arg="--" --test_arg="-l trace" --test_env="ENVOY_NGHTTP2_TRACE=" Before: http://sponge2/d358a04f-4868-4f00-a792-34907522e477 After: http://sponge2/85122944-5d24-4bbc-a50d-1c9d4843864d PiperOrigin-RevId: 410343732
diff --git a/http2/adapter/oghttp2_session.cc b/http2/adapter/oghttp2_session.cc index c63dfb7..8ca1267 100644 --- a/http2/adapter/oghttp2_session.cc +++ b/http2/adapter/oghttp2_session.cc
@@ -548,7 +548,7 @@ std::min({connection_send_window_, state.send_window, static_cast<int32_t>(max_frame_payload_)}); while (connection_can_write == SendResult::SEND_OK && available_window > 0 && - state.outbound_body != nullptr) { + state.outbound_body != nullptr && !state.data_deferred) { int64_t length; bool end_data; std::tie(length, end_data) =