Hi,
I want to override dispatch_path() with FastCGI,
because some http server does not set the $ENV{PATH_INFO},
I want to set it by my self,
but it seems not work, all the request goto the default app default run_mode.
package Mydispatch;
use base 'CGI::Application::Dispatch';
sub dispatch_path {
my $uri = $ENV{'REQUEST_URI'};
my $name = $ENV{'SCRIPT_NAME'};
$uri =~s/^$name//;
$uri =~s/\?.*$//;
$ENV{'PATH_INFO'} = $uri;
warn "[+] $uri\n"; ### the warn only print for one time when I
start the script.
return $uri;
}
sub dispatch_args {
return {
prefix => 'APP::User',
table => [
'' => { app => 'Foo' }, #### always here.
':app/:rm' => {},
],
};
}
1;
the APP::User.pm has use base 'CGI::Application::FastCGI';
and it seems to be a perl problem, not a CAP-dispatch problem, but I
can not fix it right now.
thanks!
##### CGI::Application community mailing list ################
## ##
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp ##
## ##
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
## ##
################################################################