X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fhttpd-corner.psgi;fp=t%2Fhttpd-corner.psgi;h=da8a2ee8b646ef7b9937c9d72ab9616e924f4fd3;hb=5186d1f71d83ad84104c93da6bd27908a1610403;hp=349b35dfb22d32df1096af54cba0f4001b19f7b0;hpb=310819ea86ac7f85d39a2a8720c4d179c8c94277;p=public-inbox.git 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 ]