]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Don't use Content-Encoding: header in git_snapshot
authorJakub Narebski <redacted>
Mon, 11 Dec 2006 17:09:58 +0000 (18:09 +0100)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
Do not use Content-Encoding: HTTP header in git_snapshot, using
instead type according to the snapshot type (compression type).
Some of web browser take Content-Encoding: to be _transparent_
also for downloading, and store decompressed file (with incorrect
compression suffix) on download.

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index c770690e7feb211b63a4cbdd2434b7de7aa2f3f9f876094423e8de42c7d16adf..eb04ebb1e38b4a828ebd7d64bfba0b1ba19a0e40397a5331ba5ac2b978500c2f 100755 (executable)
@@ -3415,8 +3415,7 @@ sub git_snapshot {
        my $filename = basename($project) . "-$hash.tar.$suffix";
 
        print $cgi->header(
-               -type => 'application/x-tar',
-               -content_encoding => $ctype,
+               -type => "application/$ctype",
                -content_disposition => 'inline; filename="' . "$filename" . '"',
                -status => '200 OK');
 
This page took 0.282527 seconds and 4 git commands to generate.