From 15eb65ffd59c7cf5cce67c6b7621f63194fd1083 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 3 Apr 2018 10:34:54 +0000 Subject: mbox: do not barf on queries which return no results Having zero search results means we never get a chance to populate the Content-Disposition header for mbox downloads. --- lib/PublicInbox/SearchView.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/SearchView.pm') diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 219006a0..1c4442e4 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -22,6 +22,7 @@ sub mbox_results { my ($ctx) = @_; my $q = PublicInbox::SearchQuery->new($ctx->{qp}); my $x = $q->{x}; + require PublicInbox::Mbox; return PublicInbox::Mbox::mbox_all($ctx, $q->{'q'}) if $x eq 'm'; sres_top_html($ctx); } -- cgit v1.2.3-24-ge0c7