]> Sergey Matveev's repositories - public-inbox.git/blob - t/alt.psgi
clone: support --post-update-hook= from grokmirror
[public-inbox.git] / t / alt.psgi
1 # Copyright (C) all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
3 use v5.12;
4 use warnings;
5 use Plack::Builder;
6 my $pi_config = $ENV{PI_CONFIG} // 'unset'; # capture ASAP
7 my $app = sub {
8         my ($env) = @_;
9         $env->{'psgi.errors'}->print("ALT\n");
10         [ 200, ['Content-Type', 'text/plain'], [ $pi_config ] ]
11 };
12
13 builder {
14         enable 'ContentLength';
15         enable 'Head';
16         $app;
17 }