Skip to content

Commit 3be1daa

Browse files
committed
dev: merge HTTP chunks during chunked encoding
1 parent a777bbd commit 3be1daa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/_http_outgoing.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ function write_(msg, chunk, encoding, callback, fromEnd) {
931931
let ret;
932932
if (msg.chunkedEncoding && chunk.length !== 0) {
933933
len ??= typeof chunk === 'string' ? Buffer.byteLength(chunk, encoding) : chunk.byteLength;
934-
msg._send(NumberPrototypeToString(len, 16), 'latin1', null);
934+
msg._send(NumberPrototypeToString(len, 16), 'ascii', null);
935935
msg._send(crlf_buf, null, null);
936936
msg._send(chunk, encoding, null, len);
937937
ret = msg._send(crlf_buf, null, callback);
@@ -944,6 +944,7 @@ function write_(msg, chunk, encoding, callback, fromEnd) {
944944
}
945945

946946

947+
947948
function connectionCorkNT(conn) {
948949
conn.uncork();
949950
}

0 commit comments

Comments
 (0)