git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: Don't use Content-Encoding: header in git_snapshot
@ 2006-12-11 17:09 Jakub Narebski
  0 siblings, 0 replies; only message in thread
From: Jakub Narebski @ 2006-12-11 17:09 UTC (permalink / raw)
  To: git; +Cc: Jakub Narebski

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>
---
 gitweb/gitweb.perl |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 7d24c10..040ee71 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3489,8 +3489,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');
 
-- 
1.4.4.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-11 17:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-11 17:09 [PATCH] gitweb: Don't use Content-Encoding: header in git_snapshot Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).