Hello Yann,

Comment included below.

Thanks,

Mike Rumph
On 4/1/2014 11:00 AM, Yann Ylavic wrote:

Index: modules/examples/mod_example_hooks.c
===================================================================
--- modules/examples/mod_example_hooks.c    (revision 1583714)
+++ modules/examples/mod_example_hooks.c    (working copy)
@@ -1227,7 +1227,23 @@ static int x_header_parser(request_rec *r)
      return DECLINED;
  }

+/*
+ * this routine gives our module another chance to examine the request
+ * trailers and to take special action.
+ *
+ * This is a RUN_ALL hook.
+ */
+static int x_trailer_parser(request_rec *r)
+{
+    /*
+     * We don't actually *do* anything here, except note the fact that we were
+     * called.
+     */
+    trace_request(r, "x_trailer_parser()");
+    return DECLINED;
+}

+
  /*
   * This routine is called to check for any module-specific restrictions placed
   * upon the requested resource.  (See the mod_access_compat module for an
@@ -1469,6 +1485,7 @@ static void x_register_hooks(apr_pool_t *p)
      ap_hook_translate_name(x_translate_name, NULL, NULL, APR_HOOK_MIDDLE);
      ap_hook_map_to_storage(x_map_to_storage, NULL,NULL, APR_HOOK_MIDDLE);
      ap_hook_header_parser(x_header_parser, NULL, NULL, APR_HOOK_MIDDLE);
+    ap_hook_header_parser(x_trailer_parser, NULL, NULL, APR_HOOK_MIDDLE);
Should this be ap_hook_trailer_parser?
      ap_hook_fixups(x_fixups, NULL, NULL, APR_HOOK_MIDDLE);
      ap_hook_type_checker(x_type_checker, NULL, NULL, APR_HOOK_MIDDLE);
      ap_hook_check_access(x_check_access, NULL, NULL, APR_HOOK_MIDDLE,

Reply via email to