diff options
author | Eric Wong <e@80x24.org> | 2016-03-05 05:41:12 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-03-05 05:41:12 +0000 |
commit | 5186d1f71d83ad84104c93da6bd27908a1610403 (patch) | |
tree | ec04ec66332e89fa3d2cb7c661a9580260e1ccbe /t/httpd-corner.psgi | |
parent | 310819ea86ac7f85d39a2a8720c4d179c8c94277 (diff) | |
download | public-inbox-5186d1f71d83ad84104c93da6bd27908a1610403.tar.gz |
Just to ensure we hit the code path independently of WWW code.
Diffstat (limited to 't/httpd-corner.psgi')
-rw-r--r-- | t/httpd-corner.psgi | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/httpd-corner.psgi b/t/httpd-corner.psgi index 349b35df..da8a2ee8 100644 --- a/t/httpd-corner.psgi +++ b/t/httpd-corner.psgi @@ -47,6 +47,15 @@ my $app = sub { } elsif ($path eq '/host-port') { $code = 200; push @$body, "$env->{REMOTE_ADDR}:$env->{REMOTE_PORT}"; + } elsif ($path eq '/callback') { + return sub { + my ($res) = @_; + my $buf = "hello world\n"; + push @$h, 'Content-Length', length($buf); + my $fh = $res->([200, $h]); + $fh->write($buf); + $fh->close; + } } [ $code, $h, $body ] |