in reply to Return 403 from within CGI::Application runmode

Try changing your index runmode to:

sub index { my $self = shift; $self->header_props( -status => '403 Forbidden'); return ''; }

Replies are listed 'Best First'.
Re^2: Return 403 from within CGI::Application runmode
by tbjers (Initiate) on Feb 12, 2010 at 14:35 UTC

    With this I get the exact same behavior as I did when using CGI::Application::Plugin::Apache and Apache::Request->status(). Only 400, 404, and 500 work.

    Could this be a limitation inside CGI::Application::Dispatch?

      Possibly.

      I've done something similar, which works for me... but I'm not using mod_perl, nor CGI::Application::Dispatch, nor CGI::Application::Plugin::Apache. So, maybe something in one of those is behaving badly?