From: Eric Wong Date: Wed, 25 Oct 2023 00:29:36 +0000 (+0000) Subject: www_altid: switch to psgi_yield X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dbb5273165b351697fe8ab68d73075a209e05d8;p=thirdparty%2Fpublic-inbox.git www_altid: switch to psgi_yield Another drop-in replacement for psgi_return, this one notably utilizing an unconditional qspawn.filter for gzip unlike the others. --- diff --git a/lib/PublicInbox/WwwAltId.pm b/lib/PublicInbox/WwwAltId.pm index 470561608..485201428 100644 --- a/lib/PublicInbox/WwwAltId.pm +++ b/lib/PublicInbox/WwwAltId.pm @@ -1,9 +1,9 @@ -# Copyright (C) 2020-2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ # 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;