Loading CHANGES +7 −4 Original line number Diff line number Diff line Changes with Apache 2.0.37 *) Added the "detached" attribute to the cgi_exec_info_t internals so that Win32 and Netware won't create a new window or console for each CGI invoked. PR 8387 [Brad Nicholes, William Rowe] *) Consolidated the command line parameters and attributes that are manipulated by the optional function ap_cgi_build_command() in mod_cgi into a single structure. Also added a "detached" attribute to the structure so that in addition to building the command line, each OS can specify how the CGI binary should be launched. mod_cgi into a single structure. [Brad Nicholes] *) Get rid of uninitialized value errors with "apxs -q" on certain Loading modules/arch/win32/mod_win32.c +10 −12 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ #include "http_log.h" #include "util_script.h" #include "mod_core.h" #include "apr_optional.h" #include "mod_cgi.h" #include "apr_lib.h" #ifdef WIN32 Loading Loading @@ -413,7 +413,7 @@ static apr_array_header_t *split_argv(apr_pool_t *p, const char *interp, static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, request_rec *r, apr_pool_t *p, int process_cgi, apr_cmdtype_e *type) cgi_exec_info_t *e_info) { const char *ext = NULL; const char *interpreter = NULL; Loading @@ -424,7 +424,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, d = (win32_dir_conf *)ap_get_module_config(r->per_dir_config, &win32_module); if (process_cgi) { if (e_info->cmd_type) { /* Handle the complete file name, we DON'T want to follow suexec, since * an unrooted command is as predictable as shooting craps in Win32. * Loading Loading @@ -457,8 +457,8 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, == INTERPRETER_SOURCE_REGISTRY_STRICT); interpreter = get_interpreter_from_win32_registry(r->pool, ext, strict); if (interpreter && *type != APR_SHELLCMD) { *type = APR_PROGRAM_PATH; if (interpreter && e_info->prog_type != APR_SHELLCMD) { e_info->prog_type = APR_PROGRAM_PATH; } else { ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server, Loading Loading @@ -499,8 +499,8 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, while (isspace(*interpreter)) { ++interpreter; } if (*type != APR_SHELLCMD) { *type = APR_PROGRAM_PATH; if (e_info->prog_type != APR_SHELLCMD) { e_info->prog_type = APR_PROGRAM_PATH; } } } Loading Loading @@ -529,14 +529,12 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, *argv = (const char **)(split_argv(p, interpreter, *cmd, args)->elts); *cmd = (*argv)[0]; e_info->detached = 1; return APR_SUCCESS; } APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_cgi_build_command, (const char **cmd, const char ***argv, request_rec *r, apr_pool_t *p, int replace_cmd, apr_cmdtype_e *type)); static void register_hooks(apr_pool_t *p) { APR_REGISTER_OPTIONAL_FN(ap_cgi_build_command); Loading Loading
CHANGES +7 −4 Original line number Diff line number Diff line Changes with Apache 2.0.37 *) Added the "detached" attribute to the cgi_exec_info_t internals so that Win32 and Netware won't create a new window or console for each CGI invoked. PR 8387 [Brad Nicholes, William Rowe] *) Consolidated the command line parameters and attributes that are manipulated by the optional function ap_cgi_build_command() in mod_cgi into a single structure. Also added a "detached" attribute to the structure so that in addition to building the command line, each OS can specify how the CGI binary should be launched. mod_cgi into a single structure. [Brad Nicholes] *) Get rid of uninitialized value errors with "apxs -q" on certain Loading
modules/arch/win32/mod_win32.c +10 −12 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ #include "http_log.h" #include "util_script.h" #include "mod_core.h" #include "apr_optional.h" #include "mod_cgi.h" #include "apr_lib.h" #ifdef WIN32 Loading Loading @@ -413,7 +413,7 @@ static apr_array_header_t *split_argv(apr_pool_t *p, const char *interp, static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, request_rec *r, apr_pool_t *p, int process_cgi, apr_cmdtype_e *type) cgi_exec_info_t *e_info) { const char *ext = NULL; const char *interpreter = NULL; Loading @@ -424,7 +424,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, d = (win32_dir_conf *)ap_get_module_config(r->per_dir_config, &win32_module); if (process_cgi) { if (e_info->cmd_type) { /* Handle the complete file name, we DON'T want to follow suexec, since * an unrooted command is as predictable as shooting craps in Win32. * Loading Loading @@ -457,8 +457,8 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, == INTERPRETER_SOURCE_REGISTRY_STRICT); interpreter = get_interpreter_from_win32_registry(r->pool, ext, strict); if (interpreter && *type != APR_SHELLCMD) { *type = APR_PROGRAM_PATH; if (interpreter && e_info->prog_type != APR_SHELLCMD) { e_info->prog_type = APR_PROGRAM_PATH; } else { ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server, Loading Loading @@ -499,8 +499,8 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, while (isspace(*interpreter)) { ++interpreter; } if (*type != APR_SHELLCMD) { *type = APR_PROGRAM_PATH; if (e_info->prog_type != APR_SHELLCMD) { e_info->prog_type = APR_PROGRAM_PATH; } } } Loading Loading @@ -529,14 +529,12 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, *argv = (const char **)(split_argv(p, interpreter, *cmd, args)->elts); *cmd = (*argv)[0]; e_info->detached = 1; return APR_SUCCESS; } APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_cgi_build_command, (const char **cmd, const char ***argv, request_rec *r, apr_pool_t *p, int replace_cmd, apr_cmdtype_e *type)); static void register_hooks(apr_pool_t *p) { APR_REGISTER_OPTIONAL_FN(ap_cgi_build_command); Loading