From 14bba29a4dd7428c9a86d1f44281232bccbb25e2 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Sat, 13 Apr 2002 19:55:00 +0000 Subject: [PATCH] If we have a registry command or a shebang line invocation, correct the invocation type to APR_PROGRAM_PATH so we will both search the path, and accept undecorated names, e.g. "perl" should be acceptable for "perl.exe". git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94636 13f79535-47bb-0310-9956-ffa450edef68 --- modules/arch/win32/mod_win32.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/arch/win32/mod_win32.c b/modules/arch/win32/mod_win32.c index ce7f0d6d30..b35fc262cd 100644 --- a/modules/arch/win32/mod_win32.c +++ b/modules/arch/win32/mod_win32.c @@ -435,6 +435,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, /* If the file has an extension and it is not .com and not .exe and * we've been instructed to search the registry, then do so. + * Let apr_proc_create do all of the .bat/.cmd dirty work. */ if (ext && (!strcasecmp(ext,".exe") || !strcasecmp(ext,".com") || !strcasecmp(ext,".bat") || !strcasecmp(ext,".cmd"))) { @@ -450,7 +451,10 @@ 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) { + if (interpreter) { + *type = APR_PROGRAM_PATH; + } + else { ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, r->server, strict ? "No ExecCGI verb found for files of type '%s'." : "No ExecCGI or Open verb found for files of type '%s'.", @@ -490,6 +494,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv, while (isspace(*interpreter)) { ++interpreter; } + *type = APR_PROGRAM_PATH; } } else { -- 2.50.1