^_args_check: Fixed missing &init startup during My::Web cleanup.
authorshort <>
Tue, 18 Oct 2005 05:18:08 +0000 (05:18 +0000)
committershort <>
Tue, 18 Oct 2005 05:18:08 +0000 (05:18 +0000)
&fatal: Fixed output for non-HTML pages.

Web.pm

diff --git a/Web.pm b/Web.pm
index 5c02334..f2c45cf 100644 (file)
--- a/Web.pm
+++ b/Web.pm
@@ -276,9 +276,11 @@ my($class,%args)=@_;
                $W->{"head"}.='<script type="application/javascript" src="'.uri_escaped(path_web('/My/HaveJS.pm')).'"></script>'."\n";
                }
 
-       do { _args_check(%$_) if $_; } for ($W->{"args_check"});
-
+       # Required by &_args_check below.
        $W->{"_init_done"}=1;
+
+       do { _args_check(%$_) if $_; } for $W->{"args_check"};
+
        return $W;
 }
 
@@ -647,6 +649,7 @@ my($msg)=@_;
        if (!$W->{"heading_done"}) {
                $W->{"indexme"}=0;      # For the case no heading was sent yet.
                $W->{"header_only"}=0;  # assurance for &heading
+               $W->{"content_type"}="text/html";       # Force HTML and avoid strictly checked XHTML.
                My::Web->heading();
                }
        Wprint "\n".vskip("3ex")."<hr /><h1 class=\"error\">FATAL ERROR: $msg!</h1>\n"