On Friday 14 June 2013, Stefan Fritsch wrote: > > Using a global pointer to an allocated pool variable is > > not even remotely safe when that pool gets deallocated. > > And a routine that gets called within .htaccess files is not an > > appropriate place to set a server-wide value. > > It's the process pool, and that won't get cleaned up before server > shutdown. And the secret will be initialized in post_config hook > at the latest, so there is no chance that it will be called from > .htaccess. But moving the whole thing to pre_config would be > clearer and better. I will do that when I have some cycles.
FWIW, I now remember why I did it in this convoluted way. In pre_config, there is no way to get to the process pool. 2.4 has ap_retained_data_* which can be used instead, but in 2.2 it is not that easy. But we can fix that when/if there is actually momentum to backport this to 2.2.
