@matheusbsbs / matheus-bagliano / commits / 9aa1757382
Fork 0

gitweb: Don't use Content-Encoding: header in git_snapshot

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 <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jakub Narebski committed Dec 11, 2006 at 18:09 UTC 9aa1757382002655cb72bad6a163ff430e08c962
1 file changed +1 -2
gitweb/gitweb.perl
+1 -2
@@ -3414,8 +3414,7 @@ sub git_snapshot {
3414 my $filename = basename($project) . "-$hash.tar.$suffix";
3415
3416 print $cgi->header(
3417 - -type => 'application/x-tar',
3418 - -content_encoding => $ctype,
3417 + -type => "application/$ctype",
3418 -content_disposition => 'inline; filename="' . "$filename" . '"',
3419 -status => '200 OK');
3420