Browse Source

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>
maint
Jakub Narebski 18 years ago committed by Junio C Hamano
parent
commit
9aa1757382
  1. 3
      gitweb/gitweb.perl

3
gitweb/gitweb.perl

@ -3414,8 +3414,7 @@ sub git_snapshot {
my $filename = basename($project) . "-$hash.tar.$suffix"; my $filename = basename($project) . "-$hash.tar.$suffix";


print $cgi->header( print $cgi->header(
-type => 'application/x-tar', -type => "application/$ctype",
-content_encoding => $ctype,
-content_disposition => 'inline; filename="' . "$filename" . '"', -content_disposition => 'inline; filename="' . "$filename" . '"',
-status => '200 OK'); -status => '200 OK');



Loading…
Cancel
Save