https://bz.apache.org/bugzilla/show_bug.cgi?id=59709
--- Comment #7 from Andrey Chernov <[email protected]> --- (In reply to Eric Covener from comment #6) > (In reply to Andrey Chernov from comment #5) > > (In reply to Eric Covener from comment #4) > > > from geoip2: > > > > > > /* we have two entry points, the header_parser hook, right before > > > * the authentication hook used for Dirctory specific enabled > > > geoiplookups > > > * or right before directory rewrite rules. > > > */ > > > ap_hook_header_parser(geoip_per_dir, NULL, aszSucc, APR_HOOK_FIRST); > > > > > > /* and the servectly wide hook, after reading the request. Perfecly > > > * suitable to serve serverwide mod_rewrite actions > > > */ > > > ap_hook_post_read_request(geoip_post_read_request, NULL, aszSucc, > > > APR_HOOK_MIDDLE); > > > > > > ap_if_walk() should be between these two. > > > > In geoip_per_dir(), after not founding per-directory config, it exits from > > the hook: > > > > dcfg = ap_get_module_config(r->per_dir_config, &geoip_module); > > if (!dcfg) { > > return DECLINED; > > } > > > > Can you elaborate on the relevance? It seems like this should no-op in your > global/server config setup. Sorry, wrong code pasted from geoip_per_dir(), really I mean that one: geoip_server_config_rec *cfg = ap_get_module_config(r->server->module_config, &geoip_module); if (cfg && cfg->GeoIPEnabled) { return DECLINED; } I.e. if _server_ config exists and GeoIPEnabled (as in my case), geoip_per_dir() exits from the hook with nothing processed. > > What wrong happens, in case you'll move ap_if_walk() down to > > APR_HOOK_MIDDLE? > > I don't understand the question -- ap_if_walk() is not run as part of any > hook, it's run between hooks by the core of the server. If it were delayed, > modules that "newly" run before it wouldn't see their configuration enclosed > in <if>. It sound like who was first, chicken or egg:) Should modules affect <If> to allow their results processed by it, or should <If> affect modules to be configured per-directory? We lost something in any case. Just guessing, perhaps running ap_if_walk() twice, early and later can solve it. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
