about summary refs log tree commit homepage
path: root/lib/PublicInbox/Mbox.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-03-30 00:18:42 -0500
committerEric Wong <e@yhbt.net>2020-03-30 17:49:28 +0000
commit2fc67a18b7ccd75ea6eb945f18203cbf4bcf228f (patch)
treebd039357e25d31f14caf0144175eae14cfdeafc2 /lib/PublicInbox/Mbox.pm
parent99ba1517d9a636d72b014c3d89f176575bdfcc59 (diff)
downloadpublic-inbox-2fc67a18b7ccd75ea6eb945f18203cbf4bcf228f.tar.gz
wwwstream::oneshot => html_oneshot
And use Exporter to make our life easier, since WwwAltId was
using a non-existent PublicInbox::WwwResponse namespace in error
paths which doesn't get noticed by `perl -c' or exercised by
tests on normal systems.

Fixes: 6512b1245ebc6fe3 ("www: add endpoint to retrieve altid dumps")
Diffstat (limited to 'lib/PublicInbox/Mbox.pm')
-rw-r--r--lib/PublicInbox/Mbox.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm
index 46964bbb..3013dc91 100644
--- a/lib/PublicInbox/Mbox.pm
+++ b/lib/PublicInbox/Mbox.pm
@@ -13,6 +13,7 @@ use warnings;
 use PublicInbox::MID qw/mid_escape/;
 use PublicInbox::Hval qw/to_filename/;
 use PublicInbox::Smsg;
+use PublicInbox::WwwStream qw(html_oneshot);
 use Email::Simple;
 use Email::MIME::Encode;
 
@@ -236,7 +237,7 @@ sub mbox_all {
 }
 
 sub need_gzip {
-        PublicInbox::WwwStream::oneshot($_[0], 501, \<<EOF);
+        html_oneshot($_[0], 501, \<<EOF);
 <pre>gzipped mbox not available
 
 The administrator needs to install the Compress::Raw::Zlib Perl module