]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
daemon: allow `out' directive for HTTP, too
authorEric Wong <e@80x24.org>
Sat, 14 Jun 2025 09:26:33 +0000 (09:26 +0000)
committerEric Wong <e@80x24.org>
Mon, 16 Jun 2025 20:10:42 +0000 (20:10 +0000)
While we currently don't output the the `out' directive for HTTP
as we do for protocols which lack PSGI support; the special case
for HTTP doesn't make sense as (in theory) a PSGI middleware
could someday exist to write to that destination.

lib/PublicInbox/Daemon.pm

index c199a9267eeb53fe0086345f9971b082ac3d78e9..c5af836776e06112dc0a996f866771f60d04ca7a 100644 (file)
@@ -135,9 +135,7 @@ sub load_mod ($;$$) {
        };
        $xn{post_accept} = $tlsd->can('post_accept_cb') ?
                        $tlsd->post_accept_cb : sub { $modc->new($_[0], $tlsd) };
-       my @paths = qw(out err);
        if ($modc eq 'PublicInbox::HTTP') {
-               @paths = qw(err);
                $xn{af_default} = 'httpready';
                if (my $p = $opt->{psgi}) {
                        die "multiple psgi= options specified\n" if @$p > 1;
@@ -146,7 +144,7 @@ sub load_mod ($;$$) {
                        warn "# $scheme://$addr psgi=$p->[0]\n";
                }
        }
-       for my $f (@paths) {
+       for my $f (qw(out err)) {
                my $p = $opt->{$f} or next;
                die "multiple $f= options specified\n" if @$p > 1;
                check_absolute("$f=", $p->[0]) if $daemonize;