about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-05-26 08:24:46 +0000
committerEric Wong <e@80x24.org>2019-05-26 08:25:19 +0000
commit264d876489a52ac74df17ca969bb3188fba127b1 (patch)
tree7eb208f68ec6de57fed6c99f0f6d89692b297c8f
parent880520f451ea7cf197d87c3fadc851157ed93a4a (diff)
downloadpublic-inbox-264d876489a52ac74df17ca969bb3188fba127b1.tar.gz
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.
-rw-r--r--lib/PublicInbox/ViewVCS.pm1
1 files changed, 1 insertions, 0 deletions
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) = @_;