From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1D6D41F4C3 for ; Mon, 4 Nov 2019 03:01:38 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/5] t/httpd-corner.t: drop unnecessary bytes:: for length() Date: Mon, 4 Nov 2019 03:01:34 +0000 Message-Id: <20191104030137.4301-3-e@80x24.org> In-Reply-To: <20191104030137.4301-1-e@80x24.org> References: <20191104030137.4301-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We don't need to force byte semantics for a buffer we clearly create (via ->read) with byte semantics. Since we didn't "use bytes" in t/httpd-corner.t, it was inadvertantly made available by IPC::Run (which goes away, next). --- t/httpd-corner.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/httpd-corner.t b/t/httpd-corner.t index fbba4623..50aa28e3 100644 --- a/t/httpd-corner.t +++ b/t/httpd-corner.t @@ -144,7 +144,7 @@ SKIP: { $conn->write($payload . "\r\n0\r\n\r\nGET /empty HTTP/1.0\r\n\r\n"); $conn->read(my $buf, 4096); my $lim = 0; - $lim++ while ($conn->read($buf, 4096, bytes::length($buf)) && $lim < 9); + $lim++ while ($conn->read($buf, 4096, length($buf)) && $lim < 9); my $exp = sha1_hex($payload); like($buf, qr!\r\n\r\n${exp}HTTP/1\.0 200 OK\r\n!s, 'chunk parser can handled pipelined requests');