summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2024-07-16 17:46:40 +0530
committerGitHub <noreply@github.com>2024-07-16 14:16:40 +0200
commit6421dc33ede06fb429000c3a560214cdaf573673 (patch)
tree27262bc7a58fe7ac2d0e960cdc2feb4b14584110 /ext
parent04f9db5b2217fe06f88e76146aac6362ff0b0b86 (diff)
fix(ext/node): http request uploads of subarray of buffer should work (#24603)
Closes https://github.com/denoland/deno/issues/24571
Diffstat (limited to 'ext')
-rw-r--r--ext/node/polyfills/_http_outgoing.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/_http_outgoing.ts b/ext/node/polyfills/_http_outgoing.ts
index 35526a303..a6edc1144 100644
--- a/ext/node/polyfills/_http_outgoing.ts
+++ b/ext/node/polyfills/_http_outgoing.ts
@@ -540,7 +540,7 @@ export class OutgoingMessage extends Stream {
data = Buffer.from(data, encoding);
}
if (data instanceof Buffer) {
- data = new Uint8Array(data.buffer);
+ data = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
}
if (data.buffer.byteLength > 0) {
this._bodyWriter.write(data).then(() => {