From: Jeff Trawick Date: Mon, 6 Aug 2001 21:36:32 +0000 (+0000) Subject: a couple of hacks to mod_example to get it to behave a little better: X-Git-Tag: 2.0.23~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a60a51c77406e972ceeeaf57d860609a80c1e51;p=apache a couple of hacks to mod_example to get it to behave a little better: 1) return DECLINED instead of OK from the quick_handler so we get some output 2) don't install x_fixer_upper() as a create_request handler; otherwise we segfault since r->per_dir_config hasn't been initialized yet git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89955 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/mod_example.c b/modules/experimental/mod_example.c index 242dcb06f0..deb4283c27 100644 --- a/modules/experimental/mod_example.c +++ b/modules/experimental/mod_example.c @@ -988,6 +988,9 @@ static void x_insert_filter(request_rec *r) } /* + * XXX fix my comment!!!!!! this sounds like the comment for a fixup + * handler + * * This routine is called to perform any module-specific fixing of header * fields, et cetera. It is invoked just before any content-handler. * @@ -1004,7 +1007,7 @@ static int x_quick_handler(request_rec *r) * Log the call and exit. */ trace_add(r->server, NULL, cfg, "x_post_config()"); - return OK; + return DECLINED; } /* @@ -1248,7 +1251,6 @@ static void x_register_hooks(apr_pool_t *p) ap_hook_log_transaction(x_logger, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_http_method(x_http_method, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_default_port(x_default_port, NULL, NULL, APR_HOOK_MIDDLE); - ap_hook_create_request(x_fixer_upper, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_translate_name(x_translate_handler, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_check_user_id(x_check_user_id, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_fixups(x_fixer_upper, NULL, NULL, APR_HOOK_MIDDLE);