about summary refs log tree commit homepage
path: root/t/httpd-corner.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-03-05 05:41:12 +0000
committerEric Wong <e@80x24.org>2016-03-05 05:41:12 +0000
commit5186d1f71d83ad84104c93da6bd27908a1610403 (patch)
treeec04ec66332e89fa3d2cb7c661a9580260e1ccbe /t/httpd-corner.t
parent310819ea86ac7f85d39a2a8720c4d179c8c94277 (diff)
downloadpublic-inbox-5186d1f71d83ad84104c93da6bd27908a1610403.tar.gz
Just to ensure we hit the code path independently of
WWW code.
Diffstat (limited to 't/httpd-corner.t')
-rw-r--r--t/httpd-corner.t9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/httpd-corner.t b/t/httpd-corner.t
index 19564074..a6238e48 100644
--- a/t/httpd-corner.t
+++ b/t/httpd-corner.t
@@ -76,6 +76,15 @@ my $spawn_httpd = sub {
         $spawn_httpd->('-W0');
 }
 
+{
+        my $conn = conn_for($sock, 'streaming callback');
+        $conn->write("GET /callback HTTP/1.0\r\n\r\n");
+        ok($conn->read(my $buf, 8192), 'read response');
+        my ($head, $body) = split(/\r\n\r\n/, $buf);
+        is($body, "hello world\n", 'callback body matches expected');
+}
+
+
 # Unix domain sockets
 {
         my $u = IO::Socket::UNIX->new(Type => SOCK_STREAM, Peer => $upath);