Hi, I'm trying to serve text files with unusual filename extensions, which wind up as octet-stream due to ecstatic's reliance on the "mime" module:
sven:/gr2$ nodejs -e 'console.log(require("mime").lookup("common.flp"));'
application/octet-stream
I'd prefer them to be resolved according to my local mime types DB:
sven:/gr2$ file --mime common.flp
common.flp: text/plain; charset=us-ascii
This could be achieved by using the "mime-magic" module:
sven:/gr2$ nodejs -e 'var mime = require("mime-magic"); mime("common.flp", console.log);'
null 'text/plain'
It seems that in the "mime" module, there's currently no way to distinguish known octet-streams from fallback octet-streams (mime bug #55).
I'd be glad if you could implement the mime-magic lookup into mainstream ecstatic.
(Edit 2015-12-08: The filename-based lookup is fine for default. If mime-magic lookup ever gets into mainstream ecstatic, only use it as a fallback for when filename-based mime has no idea.)
Hi, I'm trying to serve text files with unusual filename extensions, which wind up as octet-stream due to ecstatic's reliance on the "mime" module:
I'd prefer them to be resolved according to my local mime types DB:
This could be achieved by using the "mime-magic" module:
It seems that in the "mime" module, there's currently no way to distinguish known octet-streams from fallback octet-streams (mime bug #55).
I'd be glad if you could implement the mime-magic lookup into mainstream ecstatic.(Edit 2015-12-08: The filename-based lookup is fine for default. If mime-magic lookup ever gets into mainstream ecstatic, only use it as a fallback for when filename-based mime has no idea.)