]> Sergey Matveev's repositories - public-inbox.git/blob - t/clone-coderepo.psgi
httpd/async: remove useless undef
[public-inbox.git] / t / clone-coderepo.psgi
1 #!perl -w
2 # Copyright (C) all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 # for clone-coderepo.t
5 use v5.12;
6 use Plack::Builder;
7 use PublicInbox::WwwStatic;
8 use PublicInbox::WWW;
9 my $www = PublicInbox::WWW->new;
10 my $static = PublicInbox::WwwStatic->new(docroot => $ENV{TEST_DOCROOT});
11 builder {
12         enable 'Head';
13         sub {
14                 my ($env) = @_;
15                 if ($env->{PATH_INFO} eq '/manifest.js.gz') {
16                         my $res = $static->call($env);
17                         return $res if $res->[0] != 404;
18                 }
19                 $www->call($env);
20         };
21 }