diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-27 21:27:00 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2018-03-27 21:27:39 +0000 |
commit | 61ffb7233be0ac177dcf4feadba871fea8e025dd (patch) | |
tree | 4c2ec5179adeca2650297b53d08dc6a161c7078d | |
parent | 703490825ebf9e22e30ab79063a81f8476ad2a0c (diff) | |
download | public-inbox-61ffb7233be0ac177dcf4feadba871fea8e025dd.tar.gz |
We must detect EOF when reading a POST body with standard PSGI servers. This does not affect deployments using the standard public-inbox-httpd; but most smaller inboxes should be able to get away using a generic PSGI server.
-rw-r--r-- | lib/PublicInbox/GitHTTPBackend.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm index 4d2816a0..6efe5b31 100644 --- a/lib/PublicInbox/GitHTTPBackend.pm +++ b/lib/PublicInbox/GitHTTPBackend.pm @@ -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); |