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

Automatic Content-Type values only work for lower case extensions #249

Open
dan-tull opened this issue Jan 21, 2016 · 0 comments
Open

Automatic Content-Type values only work for lower case extensions #249

dan-tull opened this issue Jan 21, 2016 · 0 comments

Comments

@dan-tull
Copy link

I ran into an issue in elm-reactor where static images with the extension jpg were served with a Content-Type header of image/jpeg while those with a JPG extension get application/octet-stream (the default).

If I'm reading it right, a call to toLower on the extension around here would fix it (all the extensions in the lookup table are conveniently already in lowercase):

mbe = Map.lookup ext m

I'd have made this a pull request, but I haven't learned Haskell (though knowing elm now I can read more of it than before) and its build toolchain yet.

Thanks!

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

No branches or pull requests

1 participant