diff options
author | Jakub Narebski <jnareb@gmail.com> | 2006-06-17 18:07:24 +0200 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-06-18 21:19:14 -0700 |
commit | ad14e9317513f132293406e570f0b9360704371e (patch) | |
tree | 57198b8cdba71e1bde0174769ab1d822667254cf /gitweb | |
parent | f5aa79d909f8c4838bf500c22fa5f7967d219925 (diff) | |
download | git-ad14e9317513f132293406e570f0b9360704371e.tar.gz git-ad14e9317513f132293406e570f0b9360704371e.tar.xz |
gitweb: text files for 'blob_plain' action without charset by default
$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>
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.cgi | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi index b61b6ccbe..8fde1c883 100755 --- a/gitweb/gitweb.cgi +++ b/gitweb/gitweb.cgi @@ -47,7 +47,7 @@ my $projects_list = "index/index.aux"; # 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'); @@ -1523,9 +1523,9 @@ sub git_blob_plain { 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; } |