plack/Plack

Plack::MIME cannot handle extensions with hyphens

robrwo opened this issue · 0 comments

It should be a simple change to the regex to fix this:

sub mime_type {
    my($class, $file) = @_;
    $file =~ /(\.[a-zA-Z0-9\-]+)$/ or return;
    $MIME_TYPES->{lc $1} || $fallback->(lc $1);
}