[Jifty-commit] r454 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Jan 4 13:35:01 EST 2006
Author: jesse
Date: Wed Jan 4 13:35:01 2006
New Revision: 454
Modified:
/ (props changed)
jifty/trunk/lib/Jifty/Script/FastCGI.pm
jifty/trunk/lib/Jifty/Server.pm
Log:
r22107 at truegrounds: jesse | 2006-01-04 17:33:50 +0100
* FastCGI and standalone handlers now use Jifty->handler to do their dispatch
Modified: jifty/trunk/lib/Jifty/Script/FastCGI.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Script/FastCGI.pm (original)
+++ jifty/trunk/lib/Jifty/Script/FastCGI.pm Wed Jan 4 13:35:01 2006
@@ -37,29 +37,16 @@
sub run {
Jifty->new();
- my $Handler = HTML::Mason::CGIHandler->new( Jifty::Handler->mason_config );
-
+ my $handler = HTML::Mason::CGIHandler->new( Jifty->handler->mason_config );
while ( my $cgi = CGI::Fast->new ) {
# the whole point of fastcgi requires the env to get reset here..
# So we must squash it again
$ENV{'PATH'} = '/bin:/usr/bin';
- $ENV{'CDPATH'} = '' if defined $ENV{'CDPATH'};
$ENV{'SHELL'} = '/bin/sh' if defined $ENV{'SHELL'};
- $ENV{'ENV'} = '' if defined $ENV{'ENV'};
- $ENV{'IFS'} = '' if defined $ENV{'IFS'};
-
- Module::Refresh->refresh;
-
-
- local $HTML::Mason::Commands::JiftyWeb = Jifty::Web->new();
-
- if ( ( !$Handler->interp->comp_exists( $cgi->path_info ) )
- && ( $Handler->interp->comp_exists( $cgi->path_info . "/index.html" ) ) ) {
- $cgi->path_info( $cgi->path_info . "/index.html" );
+ for (qw(CDPATH ENV IFS)) {
+ $ENV{$_} = '' if (defined $ENV{$_} );
}
-
- eval { $Handler->handle_cgi_object($cgi); };
- Jifty::Handler->cleanup_request();
+ Jifty->handler->handle_request(mason_handler => $handler, cgi => $cgi);
}
}
Modified: jifty/trunk/lib/Jifty/Server.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Server.pm (original)
+++ jifty/trunk/lib/Jifty/Server.pm Wed Jan 4 13:35:01 2006
@@ -103,6 +103,7 @@
sub setup_jifty {
my $self = shift;
my %args = (
+ port => undef,
@_
);
@@ -122,12 +123,11 @@
sub handle_request {
my $self = shift;
+ my $cgi = shift;
- Module::Refresh->refresh;
+ Jifty->handler->handle_request( mason_handler => $self->mason_handler,
+ cgi => $cgi);
- local $HTML::Mason::Commands::JiftyWeb = Jifty::Web->new();
- $self->SUPER::handle_request(@_);
- Jifty::Handler->cleanup_request();
}
@@ -140,7 +140,6 @@
sub print_banner {
my $self = shift;
-
$self->log->info("You can connect to your server at ", Jifty::Web->url, "/");
}
More information about the Jifty-commit
mailing list