395003 make bonsai send charset=UTF-8 in its Content-Type headers

r=bear


git-svn-id: svn://10.0.0.236/trunk@238563 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%gmx.at
2007-11-05 22:32:11 +00:00
parent 1e1cb94bde
commit ed439ce5b9
33 changed files with 38 additions and 38 deletions

View File

@@ -387,7 +387,7 @@ sub FormData {
sub CheckEmailSyntax {
my ($addr) = (@_);
if ($addr !~ /^[^@, ]*@[^@, ]*\.[^@, ]*$/) {
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
print "<H1>Invalid e-mail address entered.</H1>\n";
print "The e-mail address you entered\n";
@@ -409,7 +409,7 @@ sub CheckEmailSyntax {
$| = 1;
# Uncommenting this next line can help debugging.
# print "Content-type: text/html\n\nHello mom\n";
# print "Content-Type: text/html; charset=UTF-8\n\nHello mom\n";
# foreach my $k (sort(keys %ENV)) {
# print "$k $ENV{$k}<br>\n";

View File

@@ -39,7 +39,7 @@ Unlock();
my $BIP = BatchIdPart('?');
my $BIP_nohook = BatchIdPart();
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
PutsHeader("Bonsai Administration [`$::TreeID' Tree]",
"Bonsai Administration",
"Administrating `$::TreeID' Tree");

View File

@@ -2,7 +2,7 @@ From: bonsai-daemon
To: %name%
Subject: [Bonsai] Hey! You checked in while the tree was closed!
Mime-Version: 1.0
Content-Type: text/html
Content-Type: text/html; charset=UTF-8
<HTML>

View File

@@ -26,7 +26,7 @@ require 'CGI.pl';
use vars qw($CloseTimeStamp);
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
LoadCheckins();
my $maxsize = 400;

View File

@@ -57,7 +57,7 @@ require 'cvsblame.pl';
# Cope with the cookie and print the header, first thing. That way, if
# any errors result, they will show up for the user.
print "Content-Type:text/html\n";
print "Content-Type: text/html; charset=UTF-8\n";
if ($ENV{REQUEST_METHOD} eq 'POST' and defined $::FORM{set_line}) {
# Expire the cookie 5 months from now
print "Set-Cookie: line_nums="

View File

@@ -33,7 +33,7 @@ sub print_top {
my ($title) = @_;
$title ||= "Error";
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
print "<html>\n<head>\n";
print " <title>$title</title>\n";

View File

@@ -30,7 +30,7 @@ my $ln = (($mark =~ m/^\d+$/ && $mark > 10) ? $mark-10 : 1 );
my $rev = &SanitizeRevision($::FORM{'rev'});
my $debug = $::FORM{'debug'};
print "Content-Type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
my $CVS_ROOT = $::FORM{'root'};
if( !defined($CVS_ROOT) || $CVS_ROOT eq '' ){

View File

@@ -64,7 +64,7 @@ my $filename = '';
$filename = $::FORM{'file'} if defined($::FORM{'file'});
if ($filename eq '')
{
print "Content-Type:text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
&print_usage;
PutsTrailer();
exit;
@@ -94,7 +94,7 @@ if (defined $root && $root ne '') {
if (-d $root) {
unshift(@src_roots, $root);
} else {
print "Content-Type:text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
&print_top;
print "Error: Root, $root, is not a directory.<BR><BR>\n";
PutsTrailer();
@@ -119,7 +119,7 @@ foreach (@src_roots) {
# File not found
unless ($found_rcs_file) {
print "Content-Type:text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
&print_top;
my $escaped_filename = html_quote($filename);
print "Rcs file, $escaped_filename, does not exist.<BR><BR>\n";
@@ -181,7 +181,7 @@ if ($ctype eq "rss") {
display_rss();
}
else {
print "Content-Type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
display_html();
}
@@ -387,7 +387,7 @@ sub display_rss {
$link = value_quote($link);
print <<"END";
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns="http://purl.org/rss/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

View File

@@ -97,7 +97,7 @@ if ($::FORM{'graph'}) {
}
if (!$show_xml && !$generateBackoutCVSCommands) {
print "Content-type: text/html\n\n";
print "Content-type: text/html; charset=UTF-8\n\n";
if (!$show_graph) {
print setup_script();
}

View File

@@ -29,7 +29,7 @@ require 'CGI.pl';
$|=1;
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
&LoadTreeConfig();
$::CVS_ROOT = $::FORM{'cvsroot'};

View File

@@ -1,6 +1,6 @@
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META NAME="Author" CONTENT="lloyd tabb">
<META NAME="GENERATOR" CONTENT="Mozilla/4.0 [en] (WinNT; I) [Netscape]">
<TITLE>Regular expressions in the cvs query tool</TITLE>

View File

@@ -56,12 +56,12 @@ sub sillyness {
}
my $request = new CGI;
$request->charset('UTF-8');
sub http_die {
my ($str) = (@_);
print $request->header();
print "\n";
print "Content-type: text/html\n\n";
die "$str\n";
}

View File

@@ -26,7 +26,7 @@ use strict;
require 'CGI.pl';
require 'adminfuncs.pl';
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
&validateReferer('admin.cgi');
CheckPassword(FormData('password'));

View File

@@ -24,7 +24,7 @@ use strict;
require 'CGI.pl';
print "Content-type: text/html
print "Content-type: text/html; charset=UTF-8
<HTML>";

View File

@@ -33,7 +33,7 @@ sub sillyness {
require 'CGI.pl';
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
&validateReferer('editmessage.cgi');
CheckPassword(FormData('password'));

View File

@@ -31,7 +31,7 @@ use vars %::param,
@::param_list;
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
&validateReferer('editparams.cgi');
CheckPassword(FormData('password'));

View File

@@ -23,7 +23,7 @@
use strict;
require 'CGI.pl';
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
&validateReferer(('editwhiteboard.cgi','doeditwhiteboard.cgi'));

View File

@@ -31,7 +31,7 @@ sub sillyness {
}
require 'CGI.pl';
print "Content-type: text/html
print "Content-type: text/html; charset=UTF-8
<HTML>";

View File

@@ -38,7 +38,7 @@ require 'CGI.pl';
my $form_id = &ExpectCheckinId($::FORM{'id'});
my $info = eval("\\%" . $form_id);
print "Content-type: text/html
print "Content-type: text/html; charset=UTF-8
<HTML>
<TITLE>Say the magic word.</TITLE>

View File

@@ -32,7 +32,7 @@ sub sillyness {
require 'CGI.pl';
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
my $Filename = FormData('msgname');
my $EscapedFilename = html_quote($Filename);

View File

@@ -30,7 +30,7 @@ require "defparams.pl";
use vars @::param_desc,
@::param_list;
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
#
# Check to ensure they've logged in properly

View File

@@ -32,7 +32,7 @@ sub sillyness {
require 'CGI.pl';
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
LoadWhiteboard();
PutsHeader("Scritch, scritch.", "Edit Whiteboard");

View File

@@ -39,7 +39,7 @@ require 'CGI.pl';
$|=1;
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
my $CVS_ROOT = $::FORM{'cvsroot'};
$CVS_ROOT = pickDefaultRepository() unless $CVS_ROOT;

View File

@@ -36,7 +36,7 @@ my %form;
&validateReferer('cvsquery.cgi','showcheckins.cgi');
print "Content-type: text/html
print "Content-type: text/html; charset=UTF-8
<PRE><FONT FACE='Lucida Console'>
";

View File

@@ -2,7 +2,7 @@ From: bonsai-daemon
To: %name%
Subject: [Bonsai] You're on the hook now!
Mime-Version: 1.0
Content-Type: text/html
Content-Type: text/html; charset=UTF-8
<HTML>

View File

@@ -218,7 +218,7 @@ elsif ($#ARGV == 2) {
}
else {
print "Content-type: text/html
print "Content-type: text/html; charset=UTF-8
<HTML>";
CheckPassword(FormData('password'));

View File

@@ -35,7 +35,7 @@ sub sillyness {
}
print "Content-type: text/html
print "Content-type: text/html; charset=UTF-8
<HTML>";

View File

@@ -70,7 +70,7 @@ die "Invalid directory: " . &shell_escape($dir) . ".\n" if (! -d $path);
my $rev = &SanitizeRevision($::FORM{"rev"});
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
my $registryurl = Param('registryurl');

View File

@@ -25,7 +25,7 @@ use strict;
require 'CGI.pl';
use vars qw(@TreeList);
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
Lock();
LoadCheckins();

View File

@@ -32,7 +32,7 @@ sub sillyness {
}
require 'CGI.pl';
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=UTF-8\n\n";
LoadTreeConfig();
sub IsChecked {

View File

@@ -33,7 +33,7 @@ sub StupidFuncToShutUpWarningsByUsingVarsAgain {
$z = $::TreeList;
}
print "Content-type: text/html\nRefresh: 300\n\n";
print "Content-Type: text/html; charset=UTF-8\nRefresh: 300\n\n";
PutsHeader("Bonsai -- the art of effectively controlling trees",
"Bonsai", "CVS Tree Control");

View File

@@ -42,7 +42,7 @@ sub IsChecked {
}
}
print "Content-type: text/html
print "Content-type: text/html; charset=UTF-8
<HTML>
<TITLE>Let's do the time warp again...</TITLE>

View File

@@ -30,7 +30,7 @@ my $db = ConnectToDatabase();
$| = 1;
if (!defined $form{'repositoryid'}) {
print "Content-type: text/html
print "Content-type: text/html; charset=UTF-8
This will create a cryptic report of all the people who have ever
touched each file within a directory heirarchy.