aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-08-22 16:55:34 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-22 16:05:09 -0700
commit134a6941ec7f44b9deb2cbb51429ff6a47e0d08b (patch)
tree1d30b47096132aa682a926b30894f94d5f9af519 /gitweb
parent952c65fc0201c3d506f7c4d7377ec2d8bb346d4b (diff)
downloadgit-134a6941ec7f44b9deb2cbb51429ff6a47e0d08b.tar.gz
git-134a6941ec7f44b9deb2cbb51429ff6a47e0d08b.tar.xz
gitweb: Use underscore instead of hyphen to separate words in HTTP headers names
Use underscore (which will be turned into hyphen) to separate words in HTTP header names, in keys to CGI header() method, consistently. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl9
1 files changed, 5 insertions, 4 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 63dc477ea..c4a4f7ffd 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -2198,7 +2198,8 @@ sub git_blob_plain {
$save_as .= '.txt';
}
- print $cgi->header(-type => "$type", '-content-disposition' => "inline; filename=\"$save_as\"");
+ print $cgi->header(-type => "$type",
+ -content_disposition => "inline; filename=\"$save_as\"");
undef $/;
binmode STDOUT, ':raw';
print <$fd>;
@@ -2382,8 +2383,8 @@ sub git_snapshot {
my $filename = basename($project) . "-$hash.tar.$suffix";
print $cgi->header(-type => 'application/x-tar',
- -content-encoding => $ctype,
- '-content-disposition' => "inline; filename=\"$filename\"",
+ -content_encoding => $ctype,
+ -content_disposition => "inline; filename=\"$filename\"",
-status => '200 OK');
open my $fd, "-|", "$GIT tar-tree $hash \'$project\' | $command" or
@@ -2701,7 +2702,7 @@ sub git_commitdiff_plain {
print $cgi->header(-type => "text/plain",
-charset => 'utf-8',
- '-content-disposition' => "inline; filename=\"git-$hash.patch\"");
+ -content_disposition => "inline; filename=\"git-$hash.patch\"");
my %ad = parse_date($co{'author_epoch'}, $co{'author_tz'});
my $comment = $co{'comment'};
print "From: $co{'author'}\n" .