Skip to content

fix: remove implicit Content-Type magic in res.set (#7145)#7283

Open
luvsharma6342 wants to merge 1 commit into
expressjs:masterfrom
luvsharma6342:fix/remove-res-set-magic-7145
Open

fix: remove implicit Content-Type magic in res.set (#7145)#7283
luvsharma6342 wants to merge 1 commit into
expressjs:masterfrom
luvsharma6342:fix/remove-res-set-magic-7145

Conversation

@luvsharma6342
Copy link
Copy Markdown

What’s included in the PR

lib/response.js: removed the Content-Type “magic” from res.set (no implicit MIME lookup / no charset injection); updated JSDoc
test/res.set.js: added assertions for pass-through Content-Type
test/res.send.js: updated expectations for Buffer/Uint8Array cases that previously depended on the old res.set behavior
Tests I ran locally
npx mocha ... test/res.set.js (passing)
npx mocha ... test/res.send.js (passing)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant