Commit d0c39145 authored by Ben Laurie's avatar Ben Laurie
Browse files

Make handlers use hooks.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87604 13f79535-47bb-0310-9956-ffa450edef68
parent e8dafff5
Loading
Loading
Loading
Loading
+9 −17
Original line number Diff line number Diff line
@@ -317,20 +317,6 @@ struct cmd_parms_struct {
    const ap_directive_t *err_directive;
};

typedef struct handler_rec handler_rec;

/** This structure records the existence of handlers in a module... */
struct handler_rec {
    /** The type of content this handler function will handle.  
     *  MUST be all lower case 
     */
    const char *content_type;
    /** The function to call when this context-type is requested. 
     *  @deffunc int handler(request_rec *)
     */
    int (*handler) (request_rec *);
};

typedef struct module_struct module;
/**
 * Module structures.  Just about everything is dispatched through
@@ -405,9 +391,6 @@ struct module_struct {
    /** A command_rec table that describes all of the directives this module
     * defines. */
    const command_rec *cmds;
    /** A handler_rec table that describes all of the mime-types this module
     *  will server responses for. */
    const handler_rec *handlers;

    /** A hook to allow modules to hook other points in the request processing.
     *  In this function, modules should call the ap_hook_*() functions to
@@ -1008,6 +991,15 @@ AP_DECLARE_HOOK(void,open_logs,
 */
AP_DECLARE_HOOK(void,child_init,(apr_pool_t *pchild, server_rec *s))

/**
 * Run the handler functions for each module
 * @param handler The handler string (a MIME type or a handler)
 * @param r The request_rec
 * @deffunc void ap_run_handler(const char *handler,request_rec *r)
 * @tip non-wildcard handlers should HOOK_MIDDLE, wildcard HOOK_LAST
 */
AP_DECLARE_HOOK(int,handler,(const char *handler,request_rec *r))

#ifdef __cplusplus
}
#endif
+0 −1
Original line number Diff line number Diff line
@@ -419,6 +419,5 @@ module AP_MODULE_DECLARE_DATA access_module =
    NULL,			/* server config */
    NULL,			/* merge server config */
    access_cmds,
    NULL,			/* handlers */
    register_hooks		/* register hooks */
};
+0 −1
Original line number Diff line number Diff line
@@ -332,6 +332,5 @@ module AP_MODULE_DECLARE_DATA auth_module =
    NULL,			/* server config */
    NULL,			/* merge server config */
    auth_cmds,			/* command apr_table_t */
    NULL,			/* handlers */
    register_hooks		/* register hooks */
};
+0 −1
Original line number Diff line number Diff line
@@ -78,6 +78,5 @@ module generic_hook_export_module =
    NULL,
    NULL,
    NULL,
    NULL,
    ExportRegisterHooks
};
+0 −1
Original line number Diff line number Diff line
@@ -79,6 +79,5 @@ module generic_hook_import_module=
    NULL,
    NULL,
    NULL,
    NULL,
    ImportRegisterHooks
};
Loading