summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f5aa79d)
raw | patch | inline | side by side (parent: f5aa79d)
author | Jakub Narebski <jnareb@gmail.com> | |
Sat, 17 Jun 2006 16:07:24 +0000 (18:07 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 19 Jun 2006 04:19:14 +0000 (21:19 -0700) |
$default_text_plain_charset is undefined (no specified charset) by
default. Additionally ':raw' layer for binmode is used for outputting file
content.
Signed-off-by: Junio C Hamano <junkio@cox.net>
default. Additionally ':raw' layer for binmode is used for outputting file
content.
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.cgi | patch | blob | history |
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index b61b6ccbe636d28077ae5c0636a1c3d563126679..8fde1c8833c87b64030d46cd769c340594bc6d5f 100755 (executable)
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
# default blob_plain mimetype and default charset for text/plain blob
my $default_blob_plain_mimetype = 'text/plain';
-my $default_text_plain_charset = 'utf-8'; # can be undefined
+my $default_text_plain_charset = undef;
# input validation and dispatch
my $action = $cgi->param('a');
print $cgi->header(-type => "$type", '-content-disposition' => "inline; filename=\"$save_as\"");
undef $/;
- binmode STDOUT, ':raw' unless $type =~ m/^text\//;
+ binmode STDOUT, ':raw';
print <$fd>;
- binmode STDOUT, ':utf8' unless $type =~ m/^text\//;
+ binmode STDOUT, ':utf8'; # as set at the beginning of gitweb.cgi
$/ = "\n";
close $fd;
}