Sample CGI::Application::Dispatch:
package Sample::Dispatch; use strict; use warnings; use CGI::Application::Dispatch; use base qw(CGI::Application::Dispatch); sub dispatch_args { return { prefix => 'Sample', table => [ q{} => { app => 'Application', rm => 'index' }, ], }; } 1;
Sample CGI::Application:
If you set the value of $self->query->status() to 400, 404, and 500 it works as expected. Why does it not support setting any other type of status?package Sample::Application; use strict; use warnings; use base qw(CGI::Application); use CGI::Application::Plugin::Apache qw(:all); sub setup { my ( $self, $args ) = @_; $self->run_modes('index' => 'index'); $self->start_mode('index'); return 1; } sub index { my ( $self, $args ) = @_; $self->header_type('none'); $self->query->status(403); return q{}; } 1;
In reply to Re^4: Return 403 from within CGI::Application runmode
by tbjers
in thread Return 403 from within CGI::Application runmode
by tbjers
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |