summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-12-11 17:09:58 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-12-12 08:55:20 (GMT)
commit9aa1757382002655cb72bad6a163ff430e08c962 (patch)
tree2549aa16170093d07177f4af7db5d82b72982d81
parent6f9872582246b9b8ee4bdc9f6a563b409aab1ecb (diff)
downloadgit-9aa1757382002655cb72bad6a163ff430e08c962.zip
git-9aa1757382002655cb72bad6a163ff430e08c962.tar.gz
git-9aa1757382002655cb72bad6a163ff430e08c962.tar.bz2
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>
-rwxr-xr-xgitweb/gitweb.perl3
1 files changed, 1 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 5ea3fda..145d5b5 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');