Add charset=Shift_JIS to 2ch.cgi

This commit is contained in:
Tatsuya Kinoshita
2020-11-12 21:01:16 +09:00
parent 751513a29a
commit 9914a3312f

View File

@@ -63,7 +63,7 @@ for (0 .. ($lines - 1) / 100) {
} }
$head .= "<a href=\"$cgi/l50\"><3E>ŐV50</a>\n"; $head .= "<a href=\"$cgi/l50\"><3E>ŐV50</a>\n";
print <<EOF; print <<EOF;
Content-Type: text/html Content-Type: text/html; charset=Shift_JIS
EOF EOF
$i = 1; $i = 1;
@@ -128,7 +128,7 @@ sub subback {
$cmd = "mkdir -p $dir; $WGET -O $tmp $dat >/dev/null 2>&1"; $cmd = "mkdir -p $dir; $WGET -O $tmp $dat >/dev/null 2>&1";
system $cmd; system $cmd;
print <<EOF; print <<EOF;
Content-Type: text/html Content-Type: text/html; charset=Shift_JIS
EOF EOF
@ARGV = ($tmp); @ARGV = ($tmp);
@@ -153,7 +153,7 @@ sub post {
my $host = $1; my $host = $1;
my $sock = IO::Socket::INET->new("$host:80") or die; my $sock = IO::Socket::INET->new("$host:80") or die;
# retrieve posting cookie; this may not work # retrieve posting cookie; this may not work
print "Content-Type: text/html\n\n"; print "Content-Type: text/html; charset=Shift_JIS\n\n";
print $sock print $sock
"HEAD /test/bbs.cgi HTTP/1.1\n", "HEAD /test/bbs.cgi HTTP/1.1\n",
"Host: $host\n", "Host: $host\n",