Skip to content

Commit

Permalink
[khrt#14] Avoid "dot in path" hickup
Browse files Browse the repository at this point in the history
Do not interpret "." in path names as a file extension.
  • Loading branch information
hidden-primary-net committed Apr 28, 2021
1 parent 8c4b9d8 commit e609713
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Raisin/Middleware/Formatter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ sub call {
sub _accept_header_set { length(shift || '') }
sub _path_has_extension {
my $path = shift;
my $idx_last_slash = rindex $path, '/';
$path = $idx_last_slash >= 0 ? substr $path, $idx_last_slash : $path;
my @chunks = split /\./, $path;
scalar(@chunks) > 1;
}
Expand Down

0 comments on commit e609713

Please sign in to comment.