From 1b34889b7dd4bd0ee4f6997acf38f6072f2fde98 Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Fri, 20 Feb 2026 18:54:59 +0800 Subject: [PATCH] fix: if return false shoulde set to value Signed-off-by: Weixie Cui --- 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);