#include "mod_perl.h" /* * *********** WARNING ************** * This file generated by ModPerl::Code/0.01 * Any changes made here will be lost * *********************************** * 01: lib/ModPerl/Code.pm:733 * 02: lib/ModPerl/Code.pm:759 * 03: Makefile.PL:383 * 04: Makefile.PL:96 */ int modperl_process_connection_handler(conn_rec *c) { return modperl_callback_connection(MP_PROCESS_CONNECTION_HANDLER, c, MP_HOOK_RUN_FIRST); } void modperl_child_init_handler(apr_pool_t *p, server_rec *s) { modperl_callback_process(MP_CHILD_INIT_HANDLER, p, s, MP_HOOK_VOID); } int modperl_pre_connection_handler(conn_rec *c, void *csd) { return modperl_callback_pre_connection(MP_PRE_CONNECTION_HANDLER, c, csd, MP_HOOK_RUN_ALL); } int modperl_header_parser_handler(request_rec *r) { return modperl_callback_per_dir(MP_HEADER_PARSER_HANDLER, r, MP_HOOK_RUN_ALL); } int modperl_access_handler(request_rec *r) { return modperl_callback_per_dir(MP_ACCESS_HANDLER, r, MP_HOOK_RUN_ALL); } int modperl_authen_handler(request_rec *r) { return modperl_callback_per_dir(MP_AUTHEN_HANDLER, r, MP_HOOK_RUN_FIRST); } int modperl_authz_handler(request_rec *r) { return modperl_callback_per_dir(MP_AUTHZ_HANDLER, r, MP_HOOK_RUN_FIRST); } int modperl_type_handler(request_rec *r) { return modperl_callback_per_dir(MP_TYPE_HANDLER, r, MP_HOOK_RUN_FIRST); } int modperl_fixup_handler(request_rec *r) { return modperl_callback_per_dir(MP_FIXUP_HANDLER, r, MP_HOOK_RUN_ALL); } int modperl_log_handler(request_rec *r) { return modperl_callback_per_dir(MP_LOG_HANDLER, r, MP_HOOK_RUN_ALL); } int modperl_post_read_request_handler(request_rec *r) { return modperl_callback_per_srv(MP_POST_READ_REQUEST_HANDLER, r, MP_HOOK_RUN_ALL); } int modperl_trans_handler(request_rec *r) { return modperl_callback_per_srv(MP_TRANS_HANDLER, r, MP_HOOK_RUN_FIRST); } int modperl_map_to_storage_handler(request_rec *r) { return modperl_callback_per_srv(MP_MAP_TO_STORAGE_HANDLER, r, MP_HOOK_RUN_FIRST); } int modperl_open_logs_handler(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { return modperl_callback_files(MP_OPEN_LOGS_HANDLER, pconf, plog, ptemp, s, MP_HOOK_RUN_ALL); } int modperl_post_config_handler(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { return modperl_callback_files(MP_POST_CONFIG_HANDLER, pconf, plog, ptemp, s, MP_HOOK_RUN_ALL); } void modperl_register_handler_hooks(void) { ap_hook_process_connection(modperl_process_connection_handler, NULL, NULL, APR_HOOK_FIRST); ap_hook_child_init(modperl_child_init_handler, NULL, NULL, APR_HOOK_FIRST); ap_hook_pre_connection(modperl_pre_connection_handler, NULL, NULL, APR_HOOK_FIRST); ap_hook_header_parser(modperl_header_parser_handler, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_access(modperl_access_handler, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_authen(modperl_authen_handler, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_authz(modperl_authz_handler, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_type(modperl_type_handler, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_fixup(modperl_fixup_handler, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_log(modperl_log_handler, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_post_read_request(modperl_post_read_request_handler, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_trans(modperl_trans_handler, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_map_to_storage(modperl_map_to_storage_handler, NULL, NULL, APR_HOOK_REALLY_FIRST); ap_hook_open_logs(modperl_open_logs_handler, NULL, NULL, APR_HOOK_FIRST); ap_hook_post_config(modperl_post_config_handler, NULL, NULL, APR_HOOK_FIRST); } static const char * MP_modperl_handler_desc_connection [] = { "PerlProcessConnectionHandler", NULL }; const char *modperl_handler_desc_connection(int idx) { return MP_modperl_handler_desc_connection [idx]; } static const char * MP_modperl_handler_desc_process [] = { "PerlChildInitHandler", "PerlChildExitHandler", NULL }; const char *modperl_handler_desc_process(int idx) { return MP_modperl_handler_desc_process [idx]; } static const char * MP_modperl_handler_desc_pre_connection [] = { "PerlPreConnectionHandler", NULL }; const char *modperl_handler_desc_pre_connection(int idx) { return MP_modperl_handler_desc_pre_connection [idx]; } static const char * MP_modperl_handler_desc_files [] = { "PerlOpenLogsHandler", "PerlPostConfigHandler", NULL }; const char *modperl_handler_desc_files(int idx) { return MP_modperl_handler_desc_files [idx]; } static const char * MP_modperl_handler_desc_per_srv [] = { "PerlPostReadRequestHandler", "PerlTransHandler", "PerlMapToStorageHandler", NULL }; const char *modperl_handler_desc_per_srv(int idx) { return MP_modperl_handler_desc_per_srv [idx]; } static const char * MP_modperl_handler_desc_per_dir [] = { "PerlHeaderParserHandler", "PerlAccessHandler", "PerlAuthenHandler", "PerlAuthzHandler", "PerlTypeHandler", "PerlFixupHandler", "PerlResponseHandler", "PerlLogHandler", "PerlCleanupHandler", "PerlInputFilterHandler", "PerlOutputFilterHandler", NULL }; const char *modperl_handler_desc_per_dir(int idx) { return MP_modperl_handler_desc_per_dir [idx]; } int modperl_handler_lookup(const char *name, int *type) { if (*name == 'P' && strnEQ(name, "Perl", 4)) { name += 4; } switch (*name) { case 'A': if (strnEQ(name, "Access", 6)) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_ACCESS_HANDLER; } if (strnEQ(name, "Authen", 6)) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_AUTHEN_HANDLER; } if (strnEQ(name, "Authz", 5)) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_AUTHZ_HANDLER; } case 'C': if (strnEQ(name, "ChildInit", 9)) { *type = MP_HANDLER_TYPE_PROCESS; return MP_CHILD_INIT_HANDLER; } if (strnEQ(name, "ChildExit", 9)) { *type = MP_HANDLER_TYPE_PROCESS; return MP_CHILD_EXIT_HANDLER; } if (strnEQ(name, "Cleanup", 7)) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_CLEANUP_HANDLER; } case 'F': if (strnEQ(name, "Fixup", 5)) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_FIXUP_HANDLER; } case 'H': if (strEQ(name, "Handler")) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_RESPONSE_HANDLER; } if (strnEQ(name, "HeaderParser", 12)) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_HEADER_PARSER_HANDLER; } case 'I': if (strnEQ(name, "InputFilter", 11)) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_INPUT_FILTER_HANDLER; } case 'L': if (strnEQ(name, "Log", 3)) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_LOG_HANDLER; } case 'M': if (strnEQ(name, "MapToStorage", 12)) { *type = MP_HANDLER_TYPE_PER_SRV; return MP_MAP_TO_STORAGE_HANDLER; } case 'O': if (strnEQ(name, "OutputFilter", 12)) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_OUTPUT_FILTER_HANDLER; } if (strnEQ(name, "OpenLogs", 8)) { *type = MP_HANDLER_TYPE_FILES; return MP_OPEN_LOGS_HANDLER; } case 'P': if (strnEQ(name, "ProcessConnection", 17)) { *type = MP_HANDLER_TYPE_CONNECTION; return MP_PROCESS_CONNECTION_HANDLER; } if (strnEQ(name, "PreConnection", 13)) { *type = MP_HANDLER_TYPE_PRE_CONNECTION; return MP_PRE_CONNECTION_HANDLER; } if (strnEQ(name, "PostReadRequest", 15)) { *type = MP_HANDLER_TYPE_PER_SRV; return MP_POST_READ_REQUEST_HANDLER; } if (strnEQ(name, "PostConfig", 10)) { *type = MP_HANDLER_TYPE_FILES; return MP_POST_CONFIG_HANDLER; } case 'R': if (strnEQ(name, "Response", 8)) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_RESPONSE_HANDLER; } case 'T': if (strnEQ(name, "Type", 4)) { *type = MP_HANDLER_TYPE_PER_DIR; return MP_TYPE_HANDLER; } if (strnEQ(name, "Trans", 5)) { *type = MP_HANDLER_TYPE_PER_SRV; return MP_TRANS_HANDLER; } }; return -1; }