Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make application/octet-stream the default Content-Type #1258

Merged
merged 1 commit into from Jul 6, 2020

Conversation

@@ -247,13 +247,6 @@ function _asyncReadfile (filename) {
* @return {string} A content type string
*/
function getContentType (headers) {
const headerValue = headers.get ? headers.get('content-type') : headers['content-type']

// Default content type as stated by RFC 822
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RFC 822 doesn't even contain the string "text/plain" and predates HTTP, so completely bogus.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. For completeness' sake, RFC 1521 (since obsoleted) would have been the appropriate reference --

When a mail reader encounters mail with an unknown Content-type
value, it should generally treat it as equivalent to
"application/octet-stream", as described later in this document.

@RubenVerborgh RubenVerborgh changed the title Make application/octect-stream the default Content-Type Make application/octet-stream the default Content-Type Jul 8, 2019
@michielbdejong michielbdejong merged commit 2e498d7 into master Jul 6, 2020
@michielbdejong
Copy link
Member

Thanks!

@michielbdejong michielbdejong deleted the fix/default-content-type branch July 6, 2020 10:43
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.

None yet

3 participants