% if (!$Multi) {
% } % foreach my $rep (split("\x00", $Report)) { % next unless length($rep);
% }
<%INIT> if (my $File = $r->path_info) { $File =~ s|^/||; if ($Multi) { $m->abort if $File =~ /\.\./; $r->content_type('application/octet-tream'); $r->header_out('Content-Disposition' => "attachment; filename=$File.txt"); $m->print(Encode::decode(utf8 => $DB{$session{db},$File})); $m->abort; } else { $Report = $File; } } <%ARGS> $Report => $session{current_report} $Multi => 0