Skip to content

fix: handle unknown content types in res.set('Content-Type', value)#1

Open
nmurrell07 wants to merge 1 commit intomasterfrom
fix-content-type-false-bug
Open

fix: handle unknown content types in res.set('Content-Type', value)#1
nmurrell07 wants to merge 1 commit intomasterfrom
fix-content-type-false-bug

Conversation

@nmurrell07
Copy link
Owner

Fixes a bug where res.set('Content-Type', value) incorrectly returns false for unknown MIME types. Modified the content-type handling logic in lib/response.js to properly handle cases where mime.lookup() returns null or undefined. Added proper error handling and logging for debugging purposes. Created test case to verify the fix works correctly.

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