Currently res.set includes some magic that is probably unexpected for most users. It's only for content-type, but if it looks like an invalid content type (no /) we do a mime type lookup. In v6 we should change this to avoid mutating user input when setting a header, especially since a method already exists to do this: res.type.
This was brought up due to a bug in the logic: #7034.
Currently
res.setincludes some magic that is probably unexpected for most users. It's only forcontent-type, but if it looks like an invalid content type (no/) we do a mime type lookup. In v6 we should change this to avoid mutating user input when setting a header, especially since a method already exists to do this:res.type.This was brought up due to a bug in the logic: #7034.