> If I install Apache::Sizelimit as a cleanup handler, neither > Apache::SizeLimit::exit_if_too_big() or CGI::_reset_globals() are ever > called. CGI::initialize_globals (which is what _reset_globals calls) is > called once, at compile time for CGI.pm. [...] > If I put Apache::SizeLimit in as a FixupHandler CGI::_reset_globals() is > called as expected, as is Apache::SizeLimit::exit_if_too_big() and my > own FixupHandler's handler routine.
It's still not quite clear what's conflicting with what. One thing that is clear from this is that the Apache::SizeLimit habit of installing a cleanup handler for all the actual work should either be documented or changed. Right now, installing it as a fixup handler is pointless, since it does nothing in that stage except install itself as a cleanup handler, and yet it doesn't seem to work when installed directly as a cleanup handler. I'll try to do some testing on this in the next few days and patch SizeLimit appropriately. (I'm the current maintainer of it.) For now, you can just run it as a fixup handler, with the knowledge that nothing gets done until the cleanup phase anyway. - Perrin