X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fhttpd-unix.t;h=fe4a21616373a682d71020a6be26e7b10b6f76fe;hb=63d7b8ceee55a34cde983e8548d5ce61050d2891;hp=363f36489931ee5bcb5e7bf5ee066809c5abe055;hpb=f90a619ee52ee6211c36e395401434e4c927f5c4;p=public-inbox.git
diff --git a/t/httpd-unix.t b/t/httpd-unix.t
index 363f3648..fe4a2161 100644
--- a/t/httpd-unix.t
+++ b/t/httpd-unix.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2020 all contributors
+# Copyright (C) 2016-2021 all contributors
# License: AGPL-3.0+
# Tests for binding Unix domain sockets
use strict;
@@ -42,13 +42,12 @@ for (1..1000) {
ok(-S $unix, 'UNIX socket was bound by -httpd');
sub check_sock ($) {
my ($unix) = @_;
- my $sock = IO::Socket::UNIX->new(Peer => $unix, Type => SOCK_STREAM);
- warn "E: $! connecting to $unix\n" unless defined $sock;
- ok($sock, 'client UNIX socket connected');
+ my $sock = IO::Socket::UNIX->new(Peer => $unix, Type => SOCK_STREAM)
+ // BAIL_OUT "E: $! connecting to $unix";
ok($sock->write("GET /host-port HTTP/1.0\r\n\r\n"),
'wrote req to server');
ok($sock->read(my $buf, 4096), 'read response');
- like($buf, qr!\r\n\r\n127\.0\.0\.1:0\z!,
+ like($buf, qr!\r\n\r\n127\.0\.0\.1 0\z!,
'set REMOTE_ADDR and REMOTE_PORT for Unix socket');
}