question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

no file extension, application/octet-stream

See original GitHub issue

Files with no extension are served with content-type "application/octet-stream" due to https://www.npmjs.com/package/mime#mime-default-type

Shouldn’t they just be undefined?:

mime.default_type = undefined

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
stevenvachoncommented, Feb 3, 2016

Everything that this library does, st does better.

0reactions
leviwheatcroftcommented, Oct 17, 2016

PR #184 would allow something like this:

var file = new static.Server('./public');

require('http').createServer(function (request, response) {
    request.addListener('end', function () {
        response.setHeader('Content-Type', 'text/html') // explicitly override header here
        file.serve(request, response);
    }).resume();
}).listen(8080);
Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is Octet-Stream? - A Complete Overview - Isotropic
The application/octet-stream is sent with the header file. If you attempt to download a file with a missing extension or an unknown format, ......
Read more >
About "application/octet-stream" MIME attachments - IU KB
A MIME attachment with the content type "application/octet-stream" is a binary file. Typically, it will be an application or a document that ...
Read more >
How to extract file extension from file with no ... - Stack Overflow
The problem I am running into is some of the files have a mime type of octet-stream. I've read online and this type...
Read more >
If a file has an extension that is not supported by any of ... - JFrog
If a file has an extension that is not supported by any of the MIME types or ... will use the default MIME...
Read more >
Receiving Error You are not allowed to upload
You are not allowed to upload application/octet-stream files " ... Clicking on Browse and selecting a .docx file from Documents folder.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found