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>
Jakub Narebski committed
Aug 22, 2006 at 16:55 UTC
134a6941ec7f44b9deb2cbb51429ff6a47e0d08b
1 file changed
+5
-4
gitweb/gitweb.perl
+5
-4
@@ -2198,7 +2198,8 @@ sub git_blob_plain {
2198
$save_as .= '.txt';
2199
}
2200
2201
- print $cgi->header(-type => "$type", '-content-disposition' => "inline; filename=\"$save_as\"");
2201
+ print $cgi->header(-type => "$type",
2202
+ -content_disposition => "inline; filename=\"$save_as\"");
2203
undef $/;
2204
binmode STDOUT, ':raw';
2205
print <$fd>;
@@ -2382,8 +2383,8 @@ sub git_snapshot {
2383
my $filename = basename($project) . "-$hash.tar.$suffix";
2384
2385
print $cgi->header(-type => 'application/x-tar',
2385
- -content-encoding => $ctype,
2386
- '-content-disposition' => "inline; filename=\"$filename\"",
2386
+ -content_encoding => $ctype,
2387
+ -content_disposition => "inline; filename=\"$filename\"",
2388
-status => '200 OK');
2389
2390
open my $fd, "-|", "$GIT tar-tree $hash \'$project\' | $command" or
@@ -2701,7 +2702,7 @@ sub git_commitdiff_plain {
2702
2703
print $cgi->header(-type => "text/plain",
2704
-charset => 'utf-8',
2704
- '-content-disposition' => "inline; filename=\"git-$hash.patch\"");
2705
+ -content_disposition => "inline; filename=\"git-$hash.patch\"");
2706
my %ad = parse_date($co{'author_epoch'}, $co{'author_tz'});
2707
my $comment = $co{'comment'};
2708
print "From: $co{'author'}\n" .