} elsif ($filename =~ m/\.ttf$/) {
$ct = 'application/font-snft';
$nocomp = 1;
+ } elsif ($filename =~ m/\.pdf$/) {
+ $ct = 'application/pdf';
+ $nocomp = 1;
+ } elsif ($filename =~ m/\.epub$/) {
+ $ct = 'application/epub+zip';
+ $nocomp = 1;
} else {
die "unable to detect content type";
}
return;
}
+ # fork and exit, so that parent starts a new worker
+ if (fork()) {
+ exit(0);
+ }
+
# else we need to wait until all open connections gets closed
my $w; $w = AnyEvent->timer (after => 1, interval => 1, cb => sub {
eval {