On 02/08/2009 11:38 PM, Lars Eilebrecht wrote: > Ruediger Pluem wrote on 2009-02-08 22:36:47: > >>> Well, but if EnableSendfile is configured in the main config >>> or vhost we get the setting by looking at the core_module config. >>> Of course you are right that this doesn't work when it is defined >>> inside a Location or Directory section. >> Well I am not sure if the core_dir_config structure is already setup >> during the quick handler phase (even for settings done on VHOST >> level). > > Yes, it is. The following seems to work fine: > > Index: mod_disk_cache.c > =================================================================== > --- mod_disk_cache.c (revision 742187) > +++ mod_disk_cache.c (working copy) > @@ -471,7 +471,10 @@ > /* Open the data file */ > flags = APR_READ|APR_BINARY; > #ifdef APR_SENDFILE_ENABLED > - flags |= APR_SENDFILE_ENABLED; > + core_dir_config *coreconf = ap_get_module_config(r->per_dir_config, > + &core_module);
This is not ANSI C compatible. Please declare coreconf at the beginning of the block. Otherwise no objections. Regards RĂ¼diger
