Skip to content

Conversation

reifiedbeans
Copy link
Owner

Currently, the plugin returns undefined for the Content-Type header if it can't determine the MIME type. However, this causes issues in the dev server.

Internal server error: Invalid value "undefined" for header "Content-Type"

The mime-types library we use recommends using "application/octet-stream" for a fallback value.

No fallbacks. Instead of naively returning the first available type, mime-types simply returns false, so do var type = mime.lookup('unrecognized') || 'application/octet-stream'.

This patch adopts this as the new fallback value, rather than using undefined. Fixes #13.

@reifiedbeans reifiedbeans merged commit f5352ca into main Nov 17, 2024
2 checks passed
@reifiedbeans reifiedbeans deleted the content-type-patch branch November 17, 2024 00:10
Copy link

🎉 This PR is included in version 1.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

response header without content-type header
1 participant