summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/http.ts
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2024-08-21 15:43:17 +0530
committerGitHub <noreply@github.com>2024-08-21 10:13:17 +0000
commite920835417d10f3735645c910e513886cdda6a39 (patch)
tree213bca388ea9f05135b907d5cad18feede0328b1 /ext/node/polyfills/http.ts
parentdd8a9c509f0c7c643f60e4b5aee6233383e0dc80 (diff)
fix(ext/node): pass content-disposition header as string instead of bytes (#25128)
Closes https://github.com/denoland/deno/issues/25117
Diffstat (limited to 'ext/node/polyfills/http.ts')
-rw-r--r--ext/node/polyfills/http.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts
index 76291490e..a9eee0019 100644
--- a/ext/node/polyfills/http.ts
+++ b/ext/node/polyfills/http.ts
@@ -906,7 +906,7 @@ class ClientRequest extends OutgoingMessage {
// https://www.rfc-editor.org/rfc/rfc6266#section-4.3
// Refs: https://github.com/nodejs/node/pull/46528
if (isContentDispositionField(key) && this._contentLength) {
- value = Buffer.from(value, "latin1");
+ value = Buffer.from(value).toString("latin1");
}
if (Array.isArray(value)) {