From: Jeff Trawick Date: Sun, 29 Mar 2009 14:41:02 +0000 (+0000) Subject: Core can specify a platform-specific rewrite args hook. Use that on Unix. X-Git-Tag: 2.3.3~761 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a1908585a8c3caa0438a917ac2f802b97d21e3a0;p=thirdparty%2Fapache%2Fhttpd.git Core can specify a platform-specific rewrite args hook. Use that on Unix. Windows continues to specify this in the MPM, at least until someone can separate out the MPM-specific bits. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@759699 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/arch/unix/mod_unixd.c b/modules/arch/unix/mod_unixd.c index 08446b01eea..31dec8568c4 100644 --- a/modules/arch/unix/mod_unixd.c +++ b/modules/arch/unix/mod_unixd.c @@ -354,8 +354,7 @@ static const command_rec unixd_cmds[] = { }; module AP_MODULE_DECLARE_DATA unixd_module = { - MPM20_MODULE_STUFF, - ap_mpm_rewrite_args, + STANDARD20_MODULE_STUFF, NULL, NULL, NULL, diff --git a/os/netware/os.h b/os/netware/os.h index 71af7790fd8..86a93fa6d23 100644 --- a/os/netware/os.h +++ b/os/netware/os.h @@ -32,6 +32,13 @@ #define PLATFORM "NETWARE" #endif +/* Define command-line rewriting for this platform, handled by core. + * For Netware, this is currently handled inside the Netware MPM. + * XXX To support a choice of MPMs, extract common platform behavior + * into a function specified here. + */ +#define AP_PLATFORM_REWRITE_ARGS_HOOK NULL + #include AP_DECLARE_DATA extern int hold_screen_on_exit; /* Indicates whether the screen should be held open on exit*/ diff --git a/os/unix/os.h b/os/unix/os.h index 029b1113d15..5c7fbdff32c 100644 --- a/os/unix/os.h +++ b/os/unix/os.h @@ -40,6 +40,10 @@ * parent process. */ #define AP_NEED_SET_MUTEX_PERMS 1 +/* Define command-line rewriting for this platform, handled by core. + */ +#define AP_PLATFORM_REWRITE_ARGS_HOOK ap_mpm_rewrite_args + #ifdef _OSD_POSIX pid_t os_fork(const char *user); #endif diff --git a/os/win32/os.h b/os/win32/os.h index ea5a9e74c53..0b433996d8e 100644 --- a/os/win32/os.h +++ b/os/win32/os.h @@ -40,6 +40,13 @@ #define PLATFORM "Win32" +/* Define command-line rewriting for this platform, handled by core. + * For Windows, this is currently handled inside the WinNT MPM. + * XXX To support a choice of MPMs, extract common platform behavior + * into a function specified here. + */ +#define AP_PLATFORM_REWRITE_ARGS_HOOK NULL + /* going away shortly... */ #define HAVE_DRIVE_LETTERS #define HAVE_UNC_PATHS diff --git a/server/core.c b/server/core.c index 3c42e2040c8..b9deb75da0a 100644 --- a/server/core.c +++ b/server/core.c @@ -3949,7 +3949,8 @@ static void register_hooks(apr_pool_t *p) } AP_DECLARE_DATA module core_module = { - STANDARD20_MODULE_STUFF, + MPM20_MODULE_STUFF, + AP_PLATFORM_REWRITE_ARGS_HOOK, /* hook to run before apache parses args */ create_core_dir_config, /* create per-directory config structure */ merge_core_dir_configs, /* merge per-directory config structures */ create_core_server_config, /* create per-server config structure */ diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index d01207347bd..71c7bd90fb5 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -2856,7 +2856,7 @@ static const command_rec event_cmds[] = { module AP_MODULE_DECLARE_DATA mpm_event_module = { MPM20_MODULE_STUFF, - ap_mpm_rewrite_args, /* hook to run before apache parses args */ + NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ NULL, /* merge per-directory config structures */ NULL, /* create per-server config structure */ diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index e2f7d5b470a..553355deaca 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -1536,7 +1536,7 @@ AP_GRACEFUL_SHUTDOWN_TIMEOUT_COMMAND, module AP_MODULE_DECLARE_DATA mpm_prefork_module = { MPM20_MODULE_STUFF, - ap_mpm_rewrite_args, /* hook to run before apache parses args */ + NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ NULL, /* merge per-directory config structures */ NULL, /* create per-server config structure */ diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 3a9efb60bbf..f486c9762e7 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -2354,7 +2354,7 @@ AP_GRACEFUL_SHUTDOWN_TIMEOUT_COMMAND, module AP_MODULE_DECLARE_DATA mpm_worker_module = { MPM20_MODULE_STUFF, - ap_mpm_rewrite_args, /* hook to run before apache parses args */ + NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ NULL, /* merge per-directory config structures */ NULL, /* create per-server config structure */