From 9f809009c0702bc1d9cd41fe40aca13644d4f9ba Mon Sep 17 00:00:00 2001 From: virtual machine Date: Sat, 21 Mar 2026 12:58:15 -0500 Subject: [PATCH] fix: avoid setting Content-Type header to string "false" when mime lookup fails --- lib/response.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/response.js b/lib/response.js index f965e539dd2..bc2bc6fb438 100644 --- a/lib/response.js +++ b/lib/response.js @@ -673,7 +673,7 @@ res.header = function header(field, val) { if (Array.isArray(value)) { throw new TypeError('Content-Type cannot be set to an Array'); } - value = mime.contentType(value) + value = mime.contentType(value) || value } this.setHeader(field, value);