SOLVED -> [cgiapp] Using CGI::Application with FastCGI and C::A::P::Redirect

CGI User cgiapp at mailswamp.com
Fri May 23 19:34:14 EDT 2008


Thank you Dan and everybody who replied to my postings.
It was a really CGI::Application::FastCGI module problem and
the easy fix for it is to include additional header directives into 
cgiapp_prerun method as shown below.

sub cgiapp_prerun {
       my $self = shift;

       # This is a fix for FastCGI mode
       # http://rt.cpan.org/Public/Bug/Display.html?id=17736
       $self->header_type('header');
       $self->header_props( {} );

. . . .

The rest of the code

. . . .

       return $self;
}

Now everything is working correctly in plain CGI and FastCGI modes.
Thanks again to everyone who tried to help me,

Alex



Dan Horne wrote:
> Hi Alex
> 
> As requested. You instance script should look something like:
> 
> #!/usr/bin/perl -w
> use strict;
> use FindBin qw($B
> use Webapp;
> use CGI::Fast();
> 
> while (my $q = new CGI::Fast){
>    my $webapp = Webapp->new(
>        QUERY  => $q,
>    );
>    $webapp->run();
> }
> 
> In you application class simply put "return $self->redirect(<URL>)" in 
> our runmodes as you would without FastCGI
> 
> Dan
> 
> #####  CGI::Application community mailing list  ################
> ##                                                            ##
> ##  To unsubscribe, or change your message delivery options,  ##
> ##  visit:  http://lists.openlib.org/mailman/listinfo/cgiapp    ##
> ##                                                            ##
> ##  Web archive:   http://lists.openlib.org/pipermail/cgiapp/   ##
> ##  Wiki:          http://cgiapp.erlbaum.net/                 ##
> ##                                                            ##
> ################################################################
> 



More information about the cgiapp mailing list