From d0c16bb08c0173903f51ca27455965bbbecfa1fe Mon Sep 17 00:00:00 2001 From: virtual machine Date: Fri, 20 Mar 2026 21:02:17 -0500 Subject: [PATCH] fix: handle unknown content types in res.set('Content-Type', value) --- 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);