Skip to content

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

@dan-tull

Description

@dan-tull

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions