Skip to content

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

Merged
michielbdejong merged 1 commit into
masterfrom
fix/default-content-type
Jul 6, 2020
Merged

Make application/octet-stream the default Content-Type#1258
michielbdejong merged 1 commit into
masterfrom
fix/default-content-type

Conversation

@RubenVerborgh
Copy link
Copy Markdown
Contributor

Comment thread lib/utils.js
function getContentType (headers) {
const headerValue = headers.get ? headers.get('content-type') : headers['content-type']

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

@RubenVerborgh RubenVerborgh Jul 8, 2019

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
Copy Markdown
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 force-pushed the fix/default-content-type branch from ee34324 to 9674332 Compare July 8, 2019 21:37
@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
Copy Markdown
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.

3 participants