about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-03-05 00:24:16 +0000
committerEric Wong <e@80x24.org>2016-03-05 00:24:16 +0000
commit310819ea86ac7f85d39a2a8720c4d179c8c94277 (patch)
tree4bd00bc55cb017eb93ada85bc1691fd7c01350e7 /lib
parentf459f8b0d4af1abce789fa3c9ce20a152121bc3d (diff)
downloadpublic-inbox-310819ea86ac7f85d39a2a8720c4d179c8c94277.tar.gz
We do not need line buffering, here; so favor sysread to
bypass extra copies which may be done by normal read.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/GitHTTPBackend.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm
index c84eefcf..50bb4331 100644
--- a/lib/PublicInbox/GitHTTPBackend.pm
+++ b/lib/PublicInbox/GitHTTPBackend.pm
@@ -73,7 +73,7 @@ sub serve {
                 my $n = 8192;
                 while ($len > 0) {
                         $n = $len if $len < $n;
-                        my $r = read($in, $buf, $n);
+                        my $r = sysread($in, $buf, $n);
                         last if (!defined($r) || $r <= 0);
                         $len -= $r;
                         $fh->write($buf);