--- test/html-webhacc/cc.cgi 2008/07/21 09:15:55 1.57 +++ test/html-webhacc/cc.cgi 2008/07/21 09:40:59 1.58 @@ -1,53 +1,37 @@ #!/usr/bin/perl use strict; -use utf8; use lib qw[/home/httpd/html/www/markup/html/whatpm /home/wakaba/work/manakai2/lib]; use CGI::Carp qw[fatalsToBrowser]; -use Scalar::Util qw[refaddr]; require WebHACC::Input; - require WebHACC::Result; - require WebHACC::Output; - -my $out; - require Message::DOM::DOMImplementation; - my $dom = Message::DOM::DOMImplementation->new; { - use Message::CGI::HTTP; + require Message::CGI::HTTP; my $http = Message::CGI::HTTP->new; + require WebHACC::Output; + my $out = WebHACC::Output->new; + $out->handle (*STDOUT); + $out->set_utf8; + if ($http->get_meta_variable ('PATH_INFO') ne '/') { - print STDOUT "Status: 404 Not Found\nContent-Type: text/plain; charset=us-ascii\n\n400"; + $out->http_error (404); exit; } load_text_catalog ('en'); ## TODO: conneg - $out = WebHACC::Output->new; - $out->handle (*STDOUT); - $out->set_utf8; $out->set_flush; - $out->html (qq[Content-Type: text/html; charset=utf-8 - - - -
-