Changeset 229
- Timestamp:
- 04/08/07 04:22:39 (2 years ago)
- Files:
-
- trunk/lib/MIME (added)
- trunk/lib/MIME/Type.pm (added)
- trunk/lib/MIME/Types.pm (added)
- trunk/src/core/Kwiki/kwiki (modified) (1 diff)
- trunk/src/core/Kwiki/lib/Kwiki/Boot/V1.pm (modified) (1 diff)
- trunk/src/cpan/MIME-Types-1.19 (added)
- trunk/src/cpan/MIME-Types-1.19.tar.gz (added)
- trunk/src/cpan/MIME-Types-1.19/lib (added)
- trunk/src/cpan/MIME-Types-1.19/lib/MIME (added)
- trunk/src/cpan/MIME-Types-1.19/lib/MIME/Type.pm (added)
- trunk/src/cpan/MIME-Types-1.19/lib/MIME/Type.pod (added)
- trunk/src/cpan/MIME-Types-1.19/lib/MIME/Types.pm (added)
- trunk/src/cpan/MIME-Types-1.19/lib/MIME/Types.pod (added)
- trunk/src/cpan/modules.mk (modified) (2 diffs)
- trunk/src/plugins/cpan/HTTP-Server-Simple-Kwiki-0.29/lib/HTTP/Server/Simple/Kwiki.pm (modified) (2 diffs)
- trunk/src/plugins/cpan/Kwiki-Simple-Server-HTTP-0.03/lib/Kwiki/Simple/Server/HTTP.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/core/Kwiki/kwiki
r198 r229 55 55 use lib grep { -e } split /:/, $ENV{KWIKI_LIB_PATH} || 'lib'; 56 56 use Kwiki::Boot; 57 Kwiki::Boot->boot-> main->hub->command->process(@ARGV)->hub->remove_hooks;57 Kwiki::Boot->boot->cli_config->main->hub->command->process(@ARGV)->hub->remove_hooks; 58 58 59 59 __END__ trunk/src/core/Kwiki/lib/Kwiki/Boot/V1.pm
r198 r229 35 35 $self->SUPER::add_default_classes($default); 36 36 } 37 38 sub cli_config { 39 push @{$self->config->plugin_classes}, 'Kwiki::Simple::Server::HTTP'; 40 return $self; 41 } trunk/src/cpan/modules.mk
r226 r229 9 9 IO \ 10 10 IO/Capture \ 11 MIME \ 11 12 Pod \ 12 13 Pod/Simple \ … … 26 27 File/MMagic.pm \ 27 28 IO/Capture.pm \ 29 MIME/Type.pm \ 30 MIME/Types.pm \ 28 31 Pod/Escapes.pm \ 29 32 Pod/Simple.pm \ trunk/src/plugins/cpan/HTTP-Server-Simple-Kwiki-0.29/lib/HTTP/Server/Simple/Kwiki.pm
r118 r229 1 1 package HTTP::Server::Simple::Kwiki; 2 2 3 use lib 'lib'; 4 use strict; 5 use warnings; 3 6 use HTTP::Server::Simple::CGI; 4 7 use HTTP::Server::Simple::Static; 5 8 use IO::Capture::Stdout; 6 9 use base qw(HTTP::Server::Simple::CGI HTTP::Server::Simple::Static); 7 use strict; 8 use warnings; 9 use Kwiki; 10 use Kwiki::Boot; 10 11 our $VERSION = 0.29; 11 12 … … 15 16 my $url = "http://localhost" . $ENV{REQUEST_URI}; 16 17 17 if ($url =~ /\.( gif|png|css)/) {18 if ($url =~ /\.(jpg|gif|png|css|javascript)$/) { 18 19 $self->serve_static($cgi, "."); 19 20 } else { 20 21 my $capture = IO::Capture::Stdout->new(); 21 22 $capture->start(); 22 Kwiki ->new->debug->process('config*.*', -plugins => 'plugins');23 Kwiki::Boot->debug->boot->kwiki->process; 23 24 $capture->stop(); 24 25 my $output = join '', $capture->read; 25 26 26 27 if ($output =~ m{^Status: 302}) { 27 warn "302\n$output\n";28 # warn "302\n$output\n"; 28 29 $output = "HTTP/1.0 302 OK\r\n$output"; 29 30 } else { 30 warn "2002\n$output\n";31 # warn "200\n$output\n"; 31 32 $output = "HTTP/1.0 200 OK\r\n$output"; 32 33 } trunk/src/plugins/cpan/Kwiki-Simple-Server-HTTP-0.03/lib/Kwiki/Simple/Server/HTTP.pm
r87 r229 16 16 sub handle_start { 17 17 my $port = shift || $self->hub->config->simple_server_http_port; 18 $self->destroy_hub; 18 19 my $server = HTTP::Server::Simple::Kwiki->new($port); 19 20 $server->run();
