Friday 06 February 2009 3:06:15 am
Hi
I would like to know if there is way to avoid static cache generation when an HTTP error has been encountered.
Indeed, I have to make eZPublish send an HTTP error code 500 when a PHP fatal error occurs (I can do that with <i>eZExecution::addFatalErrorHandler()</i>), but I wan't to force the static cache not to generate the static file if it encounters such error code.
It seems to be possible with CURL with <b> CURLOPT_FAILONERROR</b> option, but the only thing I see is to hack <b>eZHTTPTool::getDataByURL()</b> method, adding : curl_setopt( $ch, CURLOPT_FAILONERROR, 1 );
even if <b>$justCheckURL</b> is <i>false</i> Or maybe there is another cleaner way to do this ?
|