about summary refs log tree commit homepage
path: root/t/httpd-corner.psgi
diff options
context:
space:
mode:
Diffstat (limited to 't/httpd-corner.psgi')
-rw-r--r--t/httpd-corner.psgi9
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 ]