Skip to content

Commit 50144ba

Browse files
committed
http: remove useless slice
1 parent 5c2884b commit 50144ba

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/_http_common.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ function parserOnBody(b, start, len) {
126126

127127
// Pretend this was the result of a stream._read call.
128128
if (len > 0 && !stream._dumped) {
129-
const slice = b.slice(start, start + len);
130-
const ret = stream.push(slice);
129+
const ret = stream.push(b);
131130
if (!ret)
132131
readStop(this.socket);
133132
}

0 commit comments

Comments
 (0)