=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 4.29 retrieving revision 4.30 diff -u -p -r4.29 -r4.30 --- cvsweb/cvsweb.cgi 2019/11/29 13:39:50 4.29 +++ cvsweb/cvsweb.cgi 2019/11/29 14:29:48 4.30 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: cvsweb.cgi,v 4.29 2019/11/29 13:39:50 schwarze Exp $ +# $Id: cvsweb.cgi,v 4.30 2019/11/29 14:29:48 schwarze Exp $ # $knu: cvsweb.cgi,v 1.299 2010/11/13 16:37:18 simon # # cvsweb - a CGI interface to CVS trees. @@ -78,7 +78,7 @@ use vars qw ( $tabstop $state $annTable $sel @ForbiddenFiles $use_descriptions %descriptions $dwhere $use_moddate $gzip_open $file_list_len - $allow_tar @tar_options @gzip_options @cvs_options + $allow_tar @tar_options @cvs_options @annotate_options @rcsdiff_options $HTML_DOCTYPE $HTML_META $cssurl $CSS ); @@ -128,7 +128,7 @@ EOM $MimeTypes = undef if $@; $CheckoutMagic = '~checkout~'; - $CMD{$_} = "/usr/bin/$_" for (qw(cvs gzip rcsdiff rlog)); + $CMD{$_} = "/usr/bin/$_" for (qw(cvs rcsdiff rlog)); $CMD{tar} = "/bin/tar"; } @@ -678,22 +678,13 @@ if ($input{tarball}) { ('500 Internal Error', 'Export failure (exit status %s), output:
%s
', $errcode, $err || $export_err); - } else { - $| = 1; # Essential to get the buffering right. local (*TAR_OUT); - - my (@cmd, $ctype); - my @tar = ($CMD{tar}, @tar_options, '-cf', '-', $basedir); - my @gzip = ($CMD{gzip}, @gzip_options, '-c'); - push(@cmd, \@tar, '|', \@gzip); - $ctype = 'application/x-gzip'; - push(@cmd, '>pipe', \*TAR_OUT); - - my ($h, $err) = startproc(@cmd); + my ($h, $err) = startproc($CMD{tar}, @tar_options, '-czf', '-', + $basedir, '>pipe', \*TAR_OUT); if ($h) { - print "Content-Type: $ctype\r\n\r\n"; + print "Content-Type: application/x-gzip\r\n\r\n"; local $/ = undef; print ; $h->finish();