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

Contents of /test/html-whatpm/parser-manakai.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Sun Jul 15 07:53:00 2007 UTC (19 years, 3 months ago) by wakaba
Branch: MAIN
Changes since 1.4: +31 -1 lines
++ ChangeLog	15 Jul 2007 07:52:54 -0000
	* parser-manakai-interface.en.html: An option
	to parse as H2H is added.

	* parser-manakai.cgi: H2H parse mode is added.

2007-07-15  Wakaba  <wakaba@suika.fam.cx>

1 wakaba 1.3 #!/usr/bin/perl
2 wakaba 1.1 use strict;
3    
4     use lib qw[/home/httpd/html/www/markup/html/whatpm
5     /home/wakaba/work/manakai/lib
6     /home/wakaba/public_html/-temp/wiki/lib];
7     use CGI::Carp qw[fatalsToBrowser];
8     use Time::HiRes qw/time/;
9    
10     use SuikaWiki::Input::HTTP; ## TODO: Use some better CGI module
11    
12     my $http = SuikaWiki::Input::HTTP->new;
13    
14     ## TODO: _charset_
15    
16 wakaba 1.2 my @mode = split m#/#, scalar $http->meta_variable ('PATH_INFO'), -1;
17     shift @mode if @mode and $mode[0] == '';
18 wakaba 1.1 ## TODO: decode unreserved characters
19    
20     my $s = $http->parameter ('s');
21     if (length $s > 1000_000) {
22     print STDOUT "Status: 400 Document Too Long\nContent-Type: text/plain; charset=us-ascii\n\nToo long";
23