Skip to content

Remove magic from res.set #7145

Description

@blakeembrey

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions