* [PATCH] search_view: show "No results" text on 404
@ 2023-01-12 14:25 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2023-01-12 14:25 UTC (permalink / raw)
To: meta
Oops, this was broken a while ago
Fixes: 55263c56cf41c87f (wwwstream: reduce blob fetch paths for ->getline, 2020-07-05)
---
lib/PublicInbox/SearchView.pm | 2 +-
t/psgi_search.t | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm
index aeee2a2a..8e33079f 100644
--- a/lib/PublicInbox/SearchView.pm
+++ b/lib/PublicInbox/SearchView.pm
@@ -82,7 +82,7 @@ retry:
mset_summary($ctx, $mset, $q); # appends to {-html_tip}
$html = '';
}
- html_oneshot($ctx, $code);
+ html_oneshot($ctx, $code, $html);
}
# display non-nested search results similar to what users expect from
diff --git a/t/psgi_search.t b/t/psgi_search.t
index 8868f67e..27946391 100644
--- a/t/psgi_search.t
+++ b/t/psgi_search.t
@@ -93,6 +93,7 @@ test_psgi(sub { $www->call(@_) }, sub {
$res = $cb->(POST('/test/?q=s:bogus&x=m'));
is($res->code, 404, 'failed search result gives 404');
+ like($res->content, qr/No results found/, "`No results' shown");
is_deeply([], $warn, 'no warnings');
my $mid_re = qr/\Q$mid\E/o;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-12 14:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12 14:25 [PATCH] search_view: show "No results" text on 404 Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).