equal
deleted
inserted
replaced
63 exit 0; |
63 exit 0; |
64 } |
64 } |
65 $absolute =~ m|^\Q$base/$DIR\E| or die "invalid path: [$absolute]"; |
65 $absolute =~ m|^\Q$base/$DIR\E| or die "invalid path: [$absolute]"; |
66 |
66 |
67 open F, '<', $absolute or die "Can't open '<', '$absolute': $!"; |
67 open F, '<', $absolute or die "Can't open '<', '$absolute': $!"; |
68 print header(-type => mimetype($absolute)); |
68 print header(-type => mimetype($absolute), -charset => 'UTF-8'); |
69 if (request_method() ~~ [qw(GET POST)]) { |
69 if (request_method() ~~ [qw(GET POST)]) { |
70 my ($buf, $res); |
70 my ($buf, $res); |
71 print $buf while $res = read F, $buf, 32 * 2**10; |
71 print $buf while $res = read F, $buf, 32 * 2**10; |
72 defined $res or die "Can't read: $!"; |
72 defined $res or die "Can't read: $!"; |
73 |
73 |