From 264d876489a52ac74df17ca969bb3188fba127b1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 26 May 2019 08:24:46 +0000 Subject: viewvcs: keep temporary Solver dir for large streams Streaming large blobs can take multiple iterations of the event loop in our -httpd; so we must not let the File::Temp::Dir result go out-of-scope when streaming large blobs created from patches. --- lib/PublicInbox/ViewVCS.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 962dc66b..60a62e57 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -48,6 +48,7 @@ sub stream_large_blob ($$$$) { my $qsp = PublicInbox::Qspawn->new($cmd); my @cl = ('Content-Length', $size); my $env = $ctx->{env}; + $env->{'public-inbox.tmpgit'} = $git; # for {-tmp}/File::Temp::Dir $env->{'qspawn.wcb'} = delete $ctx->{-wcb}; $qsp->psgi_return($env, undef, sub { my ($r, $bref) = @_; -- cgit v1.2.3-24-ge0c7