-# Copyright (C) 2015 all contributors <meta@public-inbox.org>
-# License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+# Copyright (C) 2015-2018 all contributors <meta@public-inbox.org>
+# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# Streaming interface for formatting messages as an mboxrd.
# Used by the web interface
# http://www.iana.org/assignments/media-types/application/gzip
$body->{hdr} = [ 'Content-Type', 'application/gzip' ];
$body->{fn} = $fn;
- my $hdr = $body->getline; # fill in Content-Disposition filename
+ # fill in Content-Disposition filename
+ my $hdr = $body->getline;
+ if ($body->{hdr}) {
+ return [ 404, ['Content-Type','text/plain'],
+ [ "No results found\n" ] ];
+ }
[ 200, $hdr, $body ];
}