]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/GitHTTPBackend.pm
Merge commit 'mem'
[public-inbox.git] / lib / PublicInbox / GitHTTPBackend.pm
index 1fa5e30ee03c3f370cc377d523711be6782aa9ba..54ccfa05c555ec193f7eea188806d449a9ab1515 100644 (file)
@@ -1,8 +1,8 @@
-# Copyright (C) 2016 all contributors <meta@public-inbox.org>
+# Copyright (C) 2016-2018 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # when no endpoints match, fallback to this and serve a static file
-# or smart HTTP
+# or smart HTTP.  This is our wrapper for git-http-backend(1)
 package PublicInbox::GitHTTPBackend;
 use strict;
 use warnings;
@@ -280,6 +280,7 @@ sub input_to_file {
                        err($env, "error reading input: $!");
                        return;
                }
+               last if $r == 0;
                my $off = 0;
                while ($r > 0) {
                        my $w = syswrite($in, $buf, $r, $off);