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-Tag: v1.5.0-rc0~82^2~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9aa1757382002655cb72bad6a163ff430e08c962;p=git.git 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/gitweb.perl b/gitweb/gitweb.perl index 5ea3fda54..145d5b53b 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3414,8 +3414,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');