coverage analysis reports).
MOCEUXZAS4CNZL2QDKGVTZCRZ6AMOO2WSFHJ4VPZPPPAXHANG4NAC
L5VIEXSC5R72SEDSWF7HWNXMSTAAADBUMCSREU5ITMRXLEJ6KZWQC
J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC
DVNWJXWWZAR4LGE3FGGY64EW5U6GWH6MXXAALWPO3EMI4NO42ZXAC
B72GLND4UQKSGNGIY4FA6HLQNFS42SKRXV5NHTHADUJRU73NELAAC
UVMFS73TI6RARMAAGY2UVS5LCPZUKLQECXQQVER4F7S4BNUXQQ3AC
7YBYT2LQML2PKEO6UO4444AGSASS664UCDXW2YO3ALB7THQHCEBQC
$c->serve_static_file($product->path);
# Security paranoia.
foreach my $elem (@path) {
if ($elem eq "." || $elem eq ".." || $elem !~ /^[\w\-\.]+$/) {
return error($c, "Invalid filename $elem.");
}
}
my $path = $product->path . "/" . join("/", @path);
# If this is a directory but no "/" is attached, then redirect.
if (-d $path && substr($c->request->uri, -1) ne "/") {
return $c->res->redirect($c->request->uri . "/");
}
$path = "$path/index.html" if -d $path && -e "$path/index.html";
if (!-e $path) {
return error($c, "File $path does not exist.");
}
$c->serve_static_file($path);
my $sha1 = `nix-hash --flat --type sha1 $path`
or die "cannot hash $path: $?";;
chomp $sha1;
if (-f $path) {
my $st = stat($path) or die "cannot stat $path: $!";
$fileSize = $st;
$sha1 = `nix-hash --flat --type sha1 $path`
or die "cannot hash $path: $?";;
chomp $sha1;