From 4fd3d5a86e45c4dcbaaa277cfb7f1087ddebfa48 Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Mon, 10 Jun 2024 20:00:56 +0530 Subject: fix(ext/node): send data frame with end_stream flag on _final call (#24147) --- ext/node/ops/http2.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/node/ops') diff --git a/ext/node/ops/http2.rs b/ext/node/ops/http2.rs index e206db61b..abf7eae5d 100644 --- a/ext/node/ops/http2.rs +++ b/ext/node/ops/http2.rs @@ -344,6 +344,7 @@ pub async fn op_http2_client_send_data( state: Rc>, #[smi] stream_rid: ResourceId, #[buffer] data: JsBuffer, + end_of_stream: bool, ) -> Result<(), AnyError> { let resource = state .borrow() @@ -351,8 +352,7 @@ pub async fn op_http2_client_send_data( .get::(stream_rid)?; let mut stream = RcRef::map(&resource, |r| &r.stream).borrow_mut().await; - // TODO(bartlomieju): handle end of stream - stream.send_data(data.to_vec().into(), false)?; + stream.send_data(data.to_vec().into(), end_of_stream)?; Ok(()) } -- cgit v1.2.3