-
Notifications
You must be signed in to change notification settings - Fork 194
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
Add API entry points for custom and async mime lookup #66
Comments
Oh wow, mime-magic looks sick! I see two issues:
As far as sync/async: I don't really care, I'm just lazy. I'm not so sure about bringing in a compiled dependency if there's a good way to avoid it though; it's something I would need to ponder. One suggestion: Did you know that you can customize mime's internal database with Keep in touch! |
If you do irc, hit me up in #stackvm on freenode. |
met him on IRC. decided to add two hooks for mime types:
fix + pull request added to my todo. |
Sounds good! |
Has there been any progress for this issue? If you need a PR, I can do one sometime soon. |
Nope, didn't have time for it yet, or wasn't impacted bad enough by the problem, however you prefer to look at it. ;-) Would be nice if you solve it. |
Yeah, afaik nothing happened to fix this issue. |
Looking at this again, the initial approach seems like it might cause conflicts between multiple modules using ecstatic, so it'd probably be better to make the MIME lookup handler a per-instance option. |
I would really like this in http-server, so guess this is the upstream repo to follow. It's a (REALLY) nice-to-have not a need-to-have, yet. |
Good news: I got the tests to work, all pass except some minor MIME variations. I'd like to change our dependency on the old |
Oh, to better enable replacing the dependency in a scenario where npm dedupes? |
Actually it was just the easiest way to make both versions live side by side on my machine without npm going on a rampage, enforcing default whitespace style in hundreds of |
I'll just go through with that change because my dev server just failed due to the limbo. |
Looks like this shoulda been closed with https://github.com/jfhbrook/node-ecstatic/pull/143/files |
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.)
The text was updated successfully, but these errors were encountered: