]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
www_altid: switch to psgi_yield
authorEric Wong <e@80x24.org>
Wed, 25 Oct 2023 00:29:36 +0000 (00:29 +0000)
committerEric Wong <e@80x24.org>
Wed, 25 Oct 2023 07:28:39 +0000 (07:28 +0000)
Another drop-in replacement for psgi_return, this one notably
utilizing an unconditional qspawn.filter for gzip unlike the
others.

lib/PublicInbox/WwwAltId.pm

index 470561608f5df47b746cd5bab5680d23b47f3c33..4852014289f115b01f1f748d77c074e6c871e8a9 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # dumps using the ".dump" command of sqlite3(1)
 package PublicInbox::WwwAltId;
-use strict;
+use v5.12;
 use PublicInbox::Qspawn;
 use PublicInbox::WwwStream qw(html_oneshot);
 use PublicInbox::AltId;
@@ -71,7 +71,7 @@ EOF
        my $qsp = PublicInbox::Qspawn->new([$sqlite3, $fn], undef, { 0 => $r });
        $ctx->{altid_pfx} = $altid_pfx;
        $env->{'qspawn.filter'} = PublicInbox::GzipFilter->new;
-       $qsp->psgi_return($env, undef, \&check_output, $ctx);
+       $qsp->psgi_yield($env, undef, \&check_output, $ctx);
 }
 
 1;