From: Jakub Narebski Date: Mon, 11 Dec 2006 17:09:58 +0000 (+0100) Subject: gitweb: Don't use Content-Encoding: header in git_snapshot X-Git-Url: https://git.ladys.computer/Gitweb/commitdiff_plain/5389af3745819e46fd9318799dd52e7c988ec75593810dc5e24f3cf0d73d4cf7 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb.perl b/gitweb.perl index c770690..eb04ebb 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -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');