/[suikacvs]/test/html-whatpm/parser.cgi
Suika

Diff of /test/html-whatpm/parser.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by wakaba, Mon May 28 14:04:57 2007 UTC revision 1.8 by wakaba, Sat Aug 11 13:54:55 2007 UTC
# Line 2  Line 2 
2  use strict;  use strict;
3    
4  use lib qw[/home/httpd/html/www/markup/html/whatpm  use lib qw[/home/httpd/html/www/markup/html/whatpm
5             /home/wakaba/public_html/-temp/wiki/lib];             /home/wakaba/work/manakai2/lib];
6  use CGI::Carp qw[fatalsToBrowser];  use CGI::Carp qw[fatalsToBrowser];
7  use Time::HiRes qw/time/;  use Time::HiRes qw/time/;
8    
9  use SuikaWiki::Input::HTTP; ## TODO: Use some better CGI module  use Message::CGI::HTTP;
10    my $http = Message::CGI::HTTP->new;
 my $http = SuikaWiki::Input::HTTP->new;  
11    
12  ## TODO: _charset_  ## TODO: _charset_
13    
14  my $mode = $http->meta_variable ('PATH_INFO');  my $mode = $http->get_meta_variable ('PATH_INFO');
15  ## TODO: decode unreserved characters  ## TODO: decode unreserved characters
16    
17  if ($mode eq '/html' or $mode eq '/test') {  if ($mode eq '/html' or $mode eq '/test') {
# Line 20  if ($mode eq '/html' or $mode eq '/test' Line 19  if ($mode eq '/html' or $mode eq '/test'
19    require Whatpm::HTML;    require Whatpm::HTML;
20    require Whatpm::NanoDOM;    require Whatpm::NanoDOM;
21    
22    my $s = $http->parameter ('s');    my $s = $http->get_parameter ('s');
23    if (length $s > 1000_000) {    if (length $s > 1000_000) {
24      print STDOUT "Status: 400 Document Too Long\nContent-Type: text/plain; charset=us-ascii\n\nToo long";      print STDOUT "Status: 400 Document Too Long\nContent-Type: text/plain; charset=us-ascii\n\nToo long";
25      exit;      exit;
# Line 61  if ($mode eq '/html' or $mode eq '/test' Line 60  if ($mode eq '/html' or $mode eq '/test'
60    print STDOUT Encode::encode ('utf-8', $$out);    print STDOUT Encode::encode ('utf-8', $$out);
61    print STDOUT "\n";    print STDOUT "\n";
62    
63    if ($http->parameter ('dom5')) {    if ($http->get_parameter ('dom5')) {
64      require Whatpm::ContentChecker;      require Whatpm::ContentChecker;
65      print STDOUT "#domerrors\n";      print STDOUT "#domerrors\n";
66      $time1 = time;      $time1 = time;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24