about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/httpd-corner.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/httpd-corner.t b/t/httpd-corner.t
index 833eb429..8670846c 100644
--- a/t/httpd-corner.t
+++ b/t/httpd-corner.t
@@ -84,6 +84,18 @@ my $spawn_httpd = sub {
         is($body, "hello world\n", 'callback body matches expected');
 }
 
+{
+        my $conn = conn_for($sock, 'excessive header');
+        $SIG{PIPE} = 'IGNORE';
+        $conn->write("GET /callback HTTP/1.0\r\n");
+        foreach my $i (1..500000) {
+                last unless $conn->write("X-xxxxxJunk-$i: omg\r\n");
+        }
+        ok(!$conn->write("\r\n"), 'broken request');
+        ok($conn->read(my $buf, 8192), 'read response');
+        my ($head, $body) = split(/\r\n\r\n/, $buf);
+        like($head, qr/\b400\b/, 'got 400 response');
+}
 
 # Unix domain sockets
 {