I have a plugin that implements content compression.  It works well except when there is an exception thrown and we are running under mod_perl.  My custom handler looks like the following

sub handler
{
    my ($r) = @_;
    return -1 if $r->content_type && $r->content_type !~ m|^text/|i;

    my $status = eval { $ah->handle_request($r); };

    if ( $@ )
    {
        my $err = UNIVERSAL::can($@, 'as_string') ? [EMAIL PROTECTED]>as_string : "$@";
        $r->pnotes( errormessage => $err );
        $r->filename( "error_report.mpl" );

        return $ah->handle_request($r);
    }
   
    return $status;
}

I am wondering if, in my exception handling clause, there is a way I can access the underlying mason request so I can clear its buffer?  Or a way to tell a mason plugin that a new request is starting?  Otherwise, the second handle_request call doesn't seem to correctly get its output processed and, as a result, my error reports come out with no content.
--
Shane McCarron
[EMAIL PROTECTED]
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to