[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cgiapp] how to set 403 status code with CGI::App?


Why are you trying to set a 403?

Can't you just change the value of run mode and continue?

> sub cgiapp_prerun
> {
>           my ($self, $runmode) = @_;
>
>           if ($runmode eq 'private' && $needs_auth) {
>                   $runmode = 'login';
>                   $self->prerun_mode($runmode);
>           }
> }
>
> 1;

REMOVE THESE:

>                   $self->header_type('header');
>                   $self->header_props(-status=>'403 Forbidden');

In this case I do not think 'login' really has nothing to do with HTTPD 403
in this case, its just the name of a subroutine in your module.

John

Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.