my $path = PublicInbox::MID::mid2path($ctx->{mid});
my @cmd = ('git', "--git-dir=$ctx->{git_dir}",
qw(cat-file blob), "HEAD:$path");
- my $cmd = join(' ', @cmd);
my $pid = open my $fh, '-|';
defined $pid or die "fork failed: $!\n";
if ($pid == 0) {
# /$LISTNAME/m/$MESSAGE_ID.html -> HTML content (short quotes)
sub get_mid_html {
my ($ctx) = @_;
- my $x = mid2blob($ctx);
- return r404() unless $x;
+ my $x = mid2blob($ctx) or return r404();
require PublicInbox::View;
my $pfx = msg_pfx($ctx);
# /$LISTNAME/f/$MESSAGE_ID.html -> HTML content (fullquotes)
sub get_full_html {
my ($ctx) = @_;
- my $x = mid2blob($ctx);
- return r404() unless $x;
+ my $x = mid2blob($ctx) or return r404();
+
require PublicInbox::View;
my $foot = footer($ctx);
require Email::MIME;