Permalink
Browse files

Fixed wrong match for mimetypes. Example: matched only 'application/vnd'

instead of 'application/vnd.ms-excel'.
Added "\." to the mime character class
  • Loading branch information...
1 parent c1cd6c9 commit 70ddeca5e281fd97a8911c4e0b762c59da17b199 @kberov kberov committed with AndyA Mar 15, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/CGI/Simple.pm
View
@@ -515,7 +515,7 @@ sub _parse_multipart {
= $unfold =~ m/name="?\Q$param\E"?;\s+filename="?([^\"]*)"?/;
if ( defined $filename ) {
- my ( $mime ) = $unfold =~ m/Content-Type:\s+([-\w\/]+)/io;
+ my ( $mime ) = $unfold =~ m/Content-Type:\s+([-\w\.\/]+)/io;
$data =~ s/^\Q$header\E//;
( $got_data, $data, my $fh, my $size )
= $self->_save_tmpfile( $handle, $boundary, $filename,

0 comments on commit 70ddeca

Please sign in to comment.