From f8d9d0b2befb11597890e5ef2ea5ee7cc1d49581 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 1 Feb 2019 06:06:04 +0000 Subject: viewvcs: allow '0' as a valid filename for blob downloads Only to be pedantic... --- lib/PublicInbox/ViewVCS.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index eecc51e6..d67b5eb4 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -110,7 +110,7 @@ sub solve_result { } my $binary = index($$blob, "\0") >= 0; - if ($fn) { + if (defined $fn) { my $h = [ 'Content-Length', $size, 'Content-Type' ]; push(@$h, ($binary ? 'application/octet-stream' : 'text/plain')); return delete($ctx->{-wcb})->([200, $h, [ $$blob ]]); -- cgit v1.2.3-24-ge0c7