Hi Folks:

I know I'm being dense, but I can't wrap my head around this....

I have a situation where I need to redirect to another location (outside of
this cgiapp) if certain security requirements aren't met.  So, I do this in
cgiapp_prerun:

if ($req_not_met) {
    $self->header_props (-uri => 'http://www.perl.com/');
    $self->header_type ('redirect');
    return $self->emptiness;
}

and sub emptiness is just:

sub emptiness {
    return 1;
}

This prints the correct HTTP header:

Status: 302 Moved
Location: http://www.perl.com/
 
BUT, it also prints the output of my runmode which should be run if the
requirements _are_ met.

I've experimented with postrun, teardown, etc., but can find no joy.

If anyone has any helpful thoughts or gentle dope-slaps, I'd be glad for
them.

TIA,
s.

-- 
Scott Hepler
System Administration and Security
Web Development
(802) 457-3796

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to