From e920835417d10f3735645c910e513886cdda6a39 Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Wed, 21 Aug 2024 15:43:17 +0530 Subject: fix(ext/node): pass content-disposition header as string instead of bytes (#25128) Closes https://github.com/denoland/deno/issues/25117 --- ext/node/polyfills/http.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/node') 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)) { -- cgit v1.2.3