Re: returning HTTP error code
"Jeffrey W. Baker" wrote: > 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. > } Wow, pretty simple, in fact, thx a lot ! :-) Cheers. -- Helios de Creisquer mail: [EMAIL PROTECTED]
Re: returning HTTP error code
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
returning HTTP error code
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 ? Thx for your answers... Cheers. -- Helios de Creisquer mail: [EMAIL PROTECTED]