how can we test if the filehandle is valid then? may be we should skip that bit altogether? Steve, does it work if you comment out the whole
if (!size) { ... }
block?
No, it doesn't :(
I've removed the size code, too, and the problem is that after the exception is thrown, neither of the tests in RegistryCooker::read_script apply:
if (ref $@ eq 'APR::Error') { return Apache2::Const::FORBIDDEN if $@ == APR::Const::EACCES; return Apache2::Const::NOT_FOUND if $@ == APR::Const::ENOENT; # oops }
The actual error code returned by apr_file_open is 720002.