]> granicus.if.org Git - apache/commitdiff
a couple of hacks to mod_example to get it to behave a little better:
authorJeff Trawick <trawick@apache.org>
Mon, 6 Aug 2001 21:36:32 +0000 (21:36 +0000)
committerJeff Trawick <trawick@apache.org>
Mon, 6 Aug 2001 21:36:32 +0000 (21:36 +0000)
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

modules/experimental/mod_example.c

index 242dcb06f0e188d3452ab73b9b3a489151a4f080..deb4283c27ef779a9eed96a8abcd7c0c2362fd71 100644 (file)
@@ -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);