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

JPG vs jpg #2027

Closed
amilcar-calles opened this issue Oct 17, 2014 · 4 comments
Closed

JPG vs jpg #2027

amilcar-calles opened this issue Oct 17, 2014 · 4 comments
Assignees
Labels
bug Bug or defect
Milestone

Comments

@amilcar-calles
Copy link

Using the example in http://hapijs.com/tutorials/serving-files

Uppercase JPG extension files generate an application/octet-stream response, the jpg version is a correct response image/jpeg

@ThomasCrevoisier
Copy link

It comes from the module Mimos used to get the MIME type of the file : https://github.com/hapijs/mimos (which relies on https://github.com/jshttp/mime-types which doesn't have JPG in is db, that's the reason). I'm not sure if case matters when you're dealing with extensions, if it's not the case it should be easy to fix it. I'll try to submit a PR on Mimos.

@gergoerdosi
Copy link
Contributor

@ThomasCrvsr Mimos has a dependency on mime-db which contains the jpg extension (https://github.com/jshttp/mime-db/blob/master/src/mime.json):

"image/jpeg":["jpeg","jpg","jpe"]

@ThomasCrevoisier
Copy link

Sorry my bad, I took the wrong repo. Yep, that's it but it only allows lowercase extension. I submitted an issue here : hapijs/mimos#4
I've made the change locally on Mimos and the bug is gone.

@arb
Copy link
Contributor

arb commented Nov 6, 2014

Fixed here:hapijs/mimos#5 will need to publish and update shrinkwrap.

@hueniverse hueniverse added this to the 7.4.0 milestone Nov 7, 2014
@hueniverse hueniverse self-assigned this Nov 7, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect
Projects
None yet
Development

No branches or pull requests

5 participants