From 609c359dd448f2a7736ba1d93e94e1feff6acadc Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 25 Apr 2022 22:50:29 +0530 Subject: fix(ext/http): truncate read bytes when streaming bodies (#14389) stream shutdown wasn't happening correctly (moved it to call op_http_shutdown) & extra zeroed bytes were being sent for when body length not a multiple of 64*1024 --- ext/http/01_http.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ext/http/01_http.js') diff --git a/ext/http/01_http.js b/ext/http/01_http.js index 152241522..5c9deb5a3 100644 --- a/ext/http/01_http.js +++ b/ext/http/01_http.js @@ -318,13 +318,13 @@ throw error; } } + } - try { - await core.opAsync("op_http_shutdown", streamRid); - } catch (error) { - await reader.cancel(error); - throw error; - } + try { + await core.opAsync("op_http_shutdown", streamRid); + } catch (error) { + await reader.cancel(error); + throw error; } } -- cgit v1.2.3