"Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxx> writes: > @@ -2097,6 +2102,23 @@ sub git_tree { > git_footer_html(); > } > > +sub git_snapshot { > + if (!defined $hash) { > + $hash = git_get_head_hash($project); > + } > + print $cgi->header(-type=>'application/x-tar', -Content-Encoding=>'x-gzip', > + '-content-disposition' => "inline; filename=\"$project.tar.gz\"", > + -status=> '200 OK'); These -Mixed-Case, '-sometimes-quoted', spaces sometimes around double-arrow sometimes missing, parameters bother me. Perhaps: print $cgi->header(-type => 'application/x-tar', -content-encoding => 'x-gzip', -content-disposition => "inline; filename=\"$project.tar.gz\"", -status => '200 OK'); RFC 2616 says that "gzip" content-coding is registered with IANA, so I do not think you need to say "x-gzip". > + open my $fd, "-|", "$GIT tar-tree $hash \'$project\' | gzip -c6" or die_error(undef, "Execute git-tar-tree failed."); I think this "6" is because somebody suggested to use the default "6" instead of "9" in your original and the suggestion was because "9" tends to be too expensive. But if we do not have a good, specific, reason to use "6" (as opposed to, say, "5" or "7") and have "6" here only because we happen to know "6" is the current gzip default, then probably we are better off just letting gzip decide what compression level to use without specifying it ourselves? - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html