&http_moved: Fixed warn on forgotten: $W->{"charset"}
[MyWeb.git] / Web.pm
diff --git a/Web.pm b/Web.pm
index ae4a0a8..dbb9c44 100644 (file)
--- a/Web.pm
+++ b/Web.pm
@@ -706,6 +706,7 @@ my($self,$url,$status)=@_;
        $W->{"r"}->headers_out()->{"Location"}=$url;
        $W->{"header_only"}=1;
        $W->{"content_type"}=0;
+       $W->{"charset"}=0;
        My::Web->heading();
        exit;
        die "NOTREACHED";
@@ -1103,7 +1104,8 @@ my($class)=@_;
        header("Cache-Control"=>"public");      # HTTP/1.1
 
        # Use $W->{"charset"}=0 to disable charset.
-       $W->{"charset"}="us-ascii" if !defined $W->{"charset"} && !defined($W->{"content_type"}) || $W->{"content_type"};
+       $W->{"charset"}="us-ascii"
+                       if !defined $W->{"charset"} && (!defined($W->{"content_type"}) || $W->{"content_type"});
 
        # Workaround bug
        #   https://bugzilla.mozilla.org/show_bug.cgi?id=120556