On Thu, 5 Apr 2001, Helios de Creisquer wrote:

> Hi !
>
> I've got a mod_perl script calling an external program which
> use much memory. And I would like to send a 503 instead of
> calling this external program when there is less than xxxMB
> of memory free.
>
> Is mod_perl provides this ability to decide to send
> an HTTP return code or another ?

sub handler {
    my $r = shift;
    $r->status(503);
    $r->send_http_header;

    return OK; #or return SERVER_ERROR; depends on how want to do it.
}

-jwb

Reply via email to