Skip to content

fix content-type fallback to original value#7097

Closed
zamadye wants to merge 1 commit intoexpressjs:masterfrom
zamadye:master
Closed

fix content-type fallback to original value#7097
zamadye wants to merge 1 commit intoexpressjs:masterfrom
zamadye:master

Conversation

@zamadye
Copy link

@zamadye zamadye commented Mar 11, 2026

hey, noticed that when you set a custom content-type that mime.types doesnt recognize, it sets the header to "false" instead of keeping the original value.

changed it to fall back to the original value if mime.contentType() returns false. this way custom types still work.

let me know if anything needs changing!

fixes #7034

@krzysdz
Copy link
Contributor

krzysdz commented Mar 11, 2026

Duplicate of #7035

@krzysdz krzysdz marked this as a duplicate of #7035 Mar 11, 2026
@krzysdz krzysdz closed this Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

res.set('Content-Type') silently sets header to literal string 'false' for unknown types

2 participants