ben 99/07/24 11:39:21
Modified: mpm/src/include http_config.h http_request.h mpm/src/main http_config.c http_core.c http_request.c mpm/src/modules/mpm/prefork prefork.c mpm/src/modules/standard mod_access.c mod_actions.c mod_alias.c mod_asis.c mod_auth.c mod_autoindex.c mod_dir.c mod_env.c mod_imap.c mod_log_config.c mod_mime.c mod_negotiation.c mod_setenvif.c mod_userdir.c Log: Another hook. Revision Changes Path 1.10 +0 -2 apache-2.0/mpm/src/include/http_config.h Index: http_config.h =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- http_config.h 1999/07/24 18:15:52 1.9 +++ http_config.h 1999/07/24 18:38:37 1.10 @@ -241,7 +241,6 @@ int (*auth_checker) (request_rec *); int (*access_checker) (request_rec *); - int (*type_checker) (request_rec *); void (*register_hooks) (void); } module; @@ -367,7 +366,6 @@ int ap_check_access(request_rec *); /* check access on non-auth basis */ int ap_check_user_id(request_rec *); /* obtain valid username from client auth */ int ap_check_auth(request_rec *); /* check (validated) user is authorized here */ -int ap_find_types(request_rec *); /* identify MIME type */ int ap_invoke_handler(request_rec *); /* for mod_perl */ 1.5 +1 -0 apache-2.0/mpm/src/include/http_request.h Index: http_request.h =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_request.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- http_request.h 1999/07/24 18:15:53 1.4 +++ http_request.h 1999/07/24 18:38:38 1.5 @@ -116,6 +116,7 @@ DECLARE_HOOK(int,translate_name,(request_rec *)) DECLARE_HOOK(int,check_user_id,(request_rec *)) DECLARE_HOOK(int,fixups,(request_rec *)) +DECLARE_HOOK(int,type_checker,(request_rec *)) #ifdef __cplusplus } 1.13 +0 -8 apache-2.0/mpm/src/main/http_config.c Index: http_config.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- http_config.c 1999/07/24 18:15:56 1.12 +++ http_config.c 1999/07/24 18:38:46 1.13 @@ -238,7 +238,6 @@ { #define m(meth) { XtOffsetOf(module,meth),#meth } m(auth_checker), - m(type_checker), { -1, "?" }, #undef m }; @@ -275,14 +274,12 @@ { XtOffsetOf(module, auth_checker), XtOffsetOf(module, access_checker), - XtOffsetOf(module, type_checker), }; #define NMETHODS (sizeof (method_offsets)/sizeof (method_offsets[0])) static struct { int auth_checker; int access_checker; - int type_checker; } offsets_into_method_ptrs; /* @@ -363,11 +360,6 @@ int ap_check_access(request_rec *r) { return run_method(r, offsets_into_method_ptrs.access_checker, 1); -} - -int ap_find_types(request_rec *r) -{ - return run_method(r, offsets_into_method_ptrs.type_checker, 0); } IMPLEMENT_HOOK(int,header_parser,(request_rec *r),(r),RUN_ALL,OK,DECLINED) 1.10 +2 -1 apache-2.0/mpm/src/main/http_core.c Index: http_core.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- http_core.c 1999/07/24 18:15:56 1.9 +++ http_core.c 1999/07/24 18:38:48 1.10 @@ -2635,6 +2635,8 @@ ap_hook_translate_name(core_translate,NULL,NULL,HOOK_REALLY_LAST); ap_hook_process_connection(ap_process_http_connection,NULL,NULL, HOOK_REALLY_LAST); + /* FIXME: I suspect we can eliminate the need for these - Ben */ + ap_hook_type_checker(do_nothing,NULL,NULL,HOOK_REALLY_LAST); } API_VAR_EXPORT module core_module = { @@ -2652,6 +2654,5 @@ core_handlers, /* handlers */ NULL, /* check auth */ do_nothing, /* check access */ - do_nothing, /* type_checker */ register_hooks /* register hooks */ }; 1.14 +6 -4 apache-2.0/mpm/src/main/http_request.c Index: http_request.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- http_request.c 1999/07/24 18:15:57 1.13 +++ http_request.c 1999/07/24 18:38:50 1.14 @@ -82,11 +82,13 @@ HOOK_LINK(translate_name) HOOK_LINK(check_user_id) HOOK_LINK(fixups) + HOOK_LINK(type_checker) ) IMPLEMENT_HOOK(int,translate_name,(request_rec *r),(r),RUN_FIRST,OK,DECLINED) IMPLEMENT_HOOK(int,check_user_id,(request_rec *r),(r),RUN_FIRST,OK,DECLINED) IMPLEMENT_HOOK(int,fixups,(request_rec *r),(r),RUN_ALL,OK,DECLINED) +IMPLEMENT_HOOK(int,type_checker,(request_rec *r),(r),RUN_FIRST,OK,DECLINED) /***************************************************************** * @@ -813,7 +815,7 @@ || ((res = ap_run_check_user_id(rnew)) || (res = ap_check_auth(rnew))))) ) - || (res = ap_find_types(rnew)) + || (res = ap_run_type_checker(rnew)) || (res = ap_run_fixups(rnew)) ) { rnew->status = res; @@ -898,7 +900,7 @@ return rnew; } if (rnew->per_dir_config == r->per_dir_config) { - if ((res = ap_find_types(rnew)) || (res = ap_run_fixups(rnew))) { + if ((res = ap_run_type_checker(rnew)) || (res = ap_run_fixups(rnew))) { rnew->status = res; } return rnew; @@ -936,7 +938,7 @@ || ((res = ap_run_check_user_id(rnew)) || (res = ap_check_auth(rnew))))) ) - || (res = ap_find_types(rnew)) + || (res = ap_run_type_checker(rnew)) || (res = ap_run_fixups(rnew)) ) { rnew->status = res; @@ -1221,7 +1223,7 @@ if (! (r->proxyreq && r->parsed_uri.scheme != NULL && strcmp(r->parsed_uri.scheme, "http") == 0) ) { - if ((access_status = ap_find_types(r)) != 0) { + if ((access_status = ap_run_type_checker(r)) != 0) { decl_die(access_status, "find types", r); return; } 1.16 +0 -1 apache-2.0/mpm/src/modules/mpm/prefork/prefork.c Index: prefork.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- prefork.c 1999/07/24 18:16:11 1.15 +++ prefork.c 1999/07/24 18:38:55 1.16 @@ -3089,6 +3089,5 @@ NULL, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL, /* type_checker */ NULL /* register hooks */ }; 1.8 +0 -1 apache-2.0/mpm/src/modules/standard/mod_access.c Index: mod_access.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_access.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mod_access.c 1999/07/24 18:16:14 1.7 +++ mod_access.c 1999/07/24 18:39:01 1.8 @@ -402,6 +402,5 @@ NULL, /* handlers */ NULL, /* check auth */ check_dir_access, /* check access */ - NULL, /* type_checker */ NULL /* register hooks */ }; 1.7 +0 -1 apache-2.0/mpm/src/modules/standard/mod_actions.c Index: mod_actions.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_actions.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- mod_actions.c 1999/07/24 18:16:15 1.6 +++ mod_actions.c 1999/07/24 18:39:01 1.7 @@ -224,6 +224,5 @@ action_handlers, /* handlers */ NULL, /* "check auth */ NULL, /* check access */ - NULL, /* type_checker */ NULL /* register hooks */ }; 1.9 +0 -1 apache-2.0/mpm/src/modules/standard/mod_alias.c Index: mod_alias.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_alias.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_alias.c 1999/07/24 18:16:15 1.8 +++ mod_alias.c 1999/07/24 18:39:02 1.9 @@ -419,6 +419,5 @@ NULL, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL, /* type_checker */ register_hooks /* register hooks */ }; 1.8 +0 -1 apache-2.0/mpm/src/modules/standard/mod_asis.c Index: mod_asis.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_asis.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mod_asis.c 1999/07/24 18:16:17 1.7 +++ mod_asis.c 1999/07/24 18:39:02 1.8 @@ -139,6 +139,5 @@ asis_handlers, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL, /* type_checker */ NULL /* register hooks */ }; 1.8 +0 -1 apache-2.0/mpm/src/modules/standard/mod_auth.c Index: mod_auth.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_auth.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mod_auth.c 1999/07/24 18:16:18 1.7 +++ mod_auth.c 1999/07/24 18:39:02 1.8 @@ -331,6 +331,5 @@ NULL, /* handlers */ check_user_access, /* check auth */ NULL, /* check access */ - NULL, /* type_checker */ register_hooks /* register hooks */ }; 1.8 +0 -1 apache-2.0/mpm/src/modules/standard/mod_autoindex.c Index: mod_autoindex.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_autoindex.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mod_autoindex.c 1999/07/24 18:16:18 1.7 +++ mod_autoindex.c 1999/07/24 18:39:02 1.8 @@ -1663,6 +1663,5 @@ autoindex_handlers, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL, /* type_checker */ NULL /* register hooks */ }; 1.7 +0 -1 apache-2.0/mpm/src/modules/standard/mod_dir.c Index: mod_dir.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_dir.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- mod_dir.c 1999/07/24 18:16:18 1.6 +++ mod_dir.c 1999/07/24 18:39:02 1.7 @@ -237,6 +237,5 @@ dir_handlers, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL, /* type_checker */ NULL /* register hooks */ }; 1.9 +0 -1 apache-2.0/mpm/src/modules/standard/mod_env.c Index: mod_env.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_env.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_env.c 1999/07/24 18:16:19 1.8 +++ mod_env.c 1999/07/24 18:39:03 1.9 @@ -269,6 +269,5 @@ NULL, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL, /* type_checker */ register_hooks /* register hooks */ }; 1.8 +0 -1 apache-2.0/mpm/src/modules/standard/mod_imap.c Index: mod_imap.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_imap.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mod_imap.c 1999/07/24 18:16:19 1.7 +++ mod_imap.c 1999/07/24 18:39:03 1.8 @@ -910,6 +910,5 @@ imap_handlers, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL, /* type_checker */ NULL /* register hooks */ }; 1.8 +0 -1 apache-2.0/mpm/src/modules/standard/mod_log_config.c Index: mod_log_config.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_log_config.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mod_log_config.c 1999/07/24 18:16:19 1.7 +++ mod_log_config.c 1999/07/24 18:39:03 1.8 @@ -1126,6 +1126,5 @@ NULL, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL, /* type_checker */ register_hooks /* register hooks */ }; 1.7 +7 -2 apache-2.0/mpm/src/modules/standard/mod_mime.c Index: mod_mime.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_mime.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- mod_mime.c 1999/07/24 18:16:19 1.6 +++ mod_mime.c 1999/07/24 18:39:06 1.7 @@ -67,6 +67,7 @@ #include "httpd.h" #include "http_config.h" #include "http_log.h" +#include "http_request.h" typedef struct handlers_info { char *name; @@ -378,6 +379,11 @@ return OK; } +static void register_hooks() + { + ap_hook_type_checker(find_ct,NULL,NULL,HOOK_MIDDLE); + } + module MODULE_VAR_EXPORT mime_module = { STANDARD20_MODULE_STUFF, NULL, /* pre_command_line */ @@ -393,6 +399,5 @@ NULL, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - find_ct, /* type_checker */ - NULL /* register hooks */ + register_hooks /* register hooks */ }; 1.8 +1 -1 apache-2.0/mpm/src/modules/standard/mod_negotiation.c Index: mod_negotiation.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_negotiation.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- mod_negotiation.c 1999/07/24 18:16:19 1.7 +++ mod_negotiation.c 1999/07/24 18:39:06 1.8 @@ -2727,6 +2727,7 @@ static void register_hooks() { ap_hook_fixups(fix_encoding,NULL,NULL,HOOK_MIDDLE); + ap_hook_type_checker(handle_multi,NULL,NULL,HOOK_MIDDLE); } module MODULE_VAR_EXPORT negotiation_module = @@ -2745,6 +2746,5 @@ negotiation_handlers, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - handle_multi, /* type_checker */ register_hooks /* register hooks */ }; 1.9 +0 -1 apache-2.0/mpm/src/modules/standard/mod_setenvif.c Index: mod_setenvif.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_setenvif.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_setenvif.c 1999/07/24 18:16:20 1.8 +++ mod_setenvif.c 1999/07/24 18:39:06 1.9 @@ -421,7 +421,6 @@ NULL, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL, /* type_checker */ register_hooks /* register hooks */ }; 1.9 +0 -1 apache-2.0/mpm/src/modules/standard/mod_userdir.c Index: mod_userdir.c =================================================================== RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_userdir.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_userdir.c 1999/07/24 18:16:21 1.8 +++ mod_userdir.c 1999/07/24 18:39:08 1.9 @@ -349,6 +349,5 @@ NULL, /* handlers */ NULL, /* check auth */ NULL, /* check access */ - NULL, /* type_checker */ register_hooks /* register hooks */ };