my $body = $class->new($ctx, $cb);
# http://www.iana.org/assignments/media-types/application/gzip
my @h = qw(Content-Type application/gzip);
- if ($fn) {
+ if (defined $fn && $fn ne '') {
$fn = to_filename($fn);
push @h, 'Content-Disposition', "inline; filename=$fn.mbox.gz";
}
# signal that we're done and can return undef next call:
delete $self->{ctx};
my $err = $gz->flush($buf, Z_FINISH);
- $err == Z_OK ? $buf : gzip_fail($ctx, $err);
+ ($err == Z_OK) ? $buf : gzip_fail($ctx, $err);
}
sub close {} # noop