Thanks for the hints/clues,
On 7/28/22 5:29 PM, Eric Covener wrote:On Thu, Jul 28, 2022 at 3:58 PM Gary Aitken <apache@xxxxxxxxxxxxxxx> wrote:
I see the following under mod_info for Content Handlers: -10 core.c 00 mod_passenger.c 20 mod_passenger.c 10 mod_autoindex.c 00 mod_passenger.c 10 mod_auth_openidc.c 10 mod_md.c 10 mod_dav.c 10 mod_dav_svn.c 10 mod_cgid.c 10 mod_info.c 10 mod_negotiation.c 10 mod_perl.c 10 mod_perl.c 10 mod_rewrite.c 10 mod_status.c 20 mod_dav_svn.c 20 mod_commonmark.c 20 mod_passenger.c 30 core.c I don't understand the above output.
<snip>> It's the order, 10 is APR_HOOK_MIDDLE. It looks like you aren't
currently APR_HOOK_MIDDLE -- If you are trying to run before and pre-empty mod_dav/mod_dav_svn you should run as early as possible. I don't know why they are interleaved in that output, I've never seen that before. Maybe it is related to predecessors/successors having precedence over APR_HOOK_* but i didn't realize that happened. Regardless, mod_commonmark is quite late here. Any handler above it that does not decline will stop it from running.
mod_commonmark is a relic, I didn't realize it was still in there. mod_md is the one I'm interested in, so it does precede mod_dav and mod_dav_svn (both occurances) I added log_debug and the relevant configuration now looks like: <Location /repo/td/tst.md> LogMessage "=== /repo/td/tst.md === %{HANDLER}" hook=all </Location> When I set LogLevel debug I see the following output (cleaned up and abbreviated) when requesting a .md file in one of the svn (/repo) directories: 1. [log_debug:info] === /repo/td/tst.md === (type_checker hook 2. [log_debug:info] === /repo/td/tst.md === md (fixups hook, 3. [log_debug:info] === /repo/td/tst.md === dav-handler (insert_filter hook, 4. [log_debug:info] === /repo/td/tst.md === dav-handler (handler hook, 5. [:debug] mod_md.c(270): md_handler handler=dav-handler filename=dav_svn:/.../repo/td/tst.md, referer: https://my-site/repo/td/ 6. [log_debug:info] === /repo/td/tst.md === dav-handler (log_transaction hook, Line 5 is the result of the following first line in my md_handler: ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "md_handler handler=%s filename=%s", r->handler?r->handler:"<null>", r->filename?r->filename:"<null>"); Line 5 from md_handler is printed after two calls to dav-handler (insert_filter and handler). On the call to md_handler in line 5, the handler passed in (r->handler) is dav-handler, so md_handler ignores the call; md_handler is never called with r->handler == "md" Questions: 1. Why does dav-handler's handler hook get called before md's handler (which doesn't get called at all)? Would I be correct in thinking it's because of #3? 2. Is/can dav-handler's filter hook preventing the call to md's handler? 3. Should I be inserting a filter in front of dav's filter to preempt dav's filter? 4. or should I be doing something in line 2, md's fixup hook? Will/can that preclude dav's insert_filter being called? Is there a template anywhere describing how a fixup handler should/could work if it's trying to insure some order? The docs here: https://httpd.apache.org/docs/2.4/developer/request.html says "Many modules are 'trounced' by some phase above. The fixups phase is used by modules to 'reassert' their ownership or force the request's fields to their appropriate values. It isn't always the cleanest mechanism, but occasionally it's the only option." but nothing about where / how to write such a handler to insure ordering. 4. What/why is there a call to md's fixups hook when it has no fixup hook registered? The only hooks registered are: ap_hook_check_config(md_hook_check_config, NULL, NULL, APR_HOOK_LAST); ap_hook_post_config(md_post_config_handler, NULL, NULL, APR_HOOK_LAST); ap_hook_log_transaction(md_log_handler, NULL, NULL, APR_HOOK_LAST); ap_hook_handler(md_handler, NULL, conflicting_mods, APR_HOOK_MIDDLE); confused, but learning things along the way... thanks, Gary --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx