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

Multiple Mime-Types for an extension #23

Open
jstans opened this issue Dec 4, 2015 · 4 comments
Open

Multiple Mime-Types for an extension #23

jstans opened this issue Dec 4, 2015 · 4 comments
Assignees
Milestone

Comments

@jstans
Copy link

jstans commented Dec 4, 2015

This relates to: koajs/koa#617.

As an extension can correspond to multiple mime-types, wouldn't it be correct to return an array of all matches and let libraries handle that?

Perhaps a .lookupAll() which strictly returns an array to avoid breaking existing code or over-complicating something which not everyone will want to make use of.

@dougwilson dougwilson self-assigned this Jan 6, 2016
@thihara
Copy link

thihara commented Oct 15, 2016

@dougwilson Anyone working on this?

@dougwilson
Copy link
Contributor

HI @thihara nope. I see you made a PR, so awesome!

@rijnhard
Copy link

This still has value, I just ran into it now. I see the pr for allExtensions but not for lookupAll (all mime types from a single extension)
Makes it kind of difficult to check that the binary is what you are expecting from the extension or content-type headers.

I'm going to log an issue on our tracking system, if it doesn't move the odds are I will do it.

@pseudoramble
Copy link

I took a crack at this today and have a PR open for it. Hoping it's a good starting point to discuss more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants