-# Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2016-2020 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict;
use warnings;
$td = start_script($cmd, undef, { 3 => $sock });
my $host = $sock->sockhost;
my $port = $sock->sockport;
+ {
+ my $bad = tcp_connect($sock);
+ print $bad "GETT / HTTP/1.0\r\n\r\n" or die;
+ like(<$bad>, qr!\AHTTP/1\.[01] 405\b!, 'got 405 on bad req');
+ }
my $conn = tcp_connect($sock);
ok($conn, 'connected');
ok($conn->write("GET / HTTP/1.0\r\n\r\n"), 'wrote data to socket');