If {parse_hdr} callback doesn't handle it, we need to break the
loop if the CGI process dies prematurely. This doesn't fix a
currently known problem, but theoretically a SIGKILL could hit
(cgit || git-http-backend) while -netd or -httpd survives.
if ($@) {
warn "parse_hdr: $@";
$ret = [ 500, [], [ "Internal error\n" ] ];
+ } elsif (!defined($ret) && !$r) {
+ my $cmd = $self->{cmd} // [ '(?)' ];
+ my $env = $self->{psgi_env};
+ warn <<EOM;
+EOF parsing headers from @$cmd ($self->{psgi_env}->{REQUEST_URI})
+EOM
+ $ret = [ 500, [], [ "Internal error\n" ] ];
}
} else {
# caller should notify us when it's ready: