From: William A. Rowe Jr Date: Mon, 21 Jun 2004 18:31:27 +0000 (+0000) Subject: Fix the rewrite_map program invocation for Win32. Someone borrowed X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24d7e45d062b79d54e204cc17015fbdd88f9ffd6;p=thirdparty%2Fapache%2Fhttpd.git Fix the rewrite_map program invocation for Win32. Someone borrowed the pass-environ[][] construct from unix, but CreateProcess is much happier to copy the current environment when passed NULL for the flat environment strings argument (properly formatted, that argument must be null or a string in the format "var1=val\0var2=val\0\0".) The only other CreateProcess call which does *not* pass NULL for the envvars arg, in util_script.c for cgi, does the right thing in constructing that argument. Submitted by: Philip Gladstone [pgladstone cisco.com] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@104005 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/modules/standard/mod_rewrite.c b/src/modules/standard/mod_rewrite.c index 30d27be0d0d..86f7d90a880 100644 --- a/src/modules/standard/mod_rewrite.c +++ b/src/modules/standard/mod_rewrite.c @@ -3573,8 +3573,8 @@ static int rewritemap_program_child(void *cmd, child_info *pinfo) si.hStdOutput = pinfo->hPipeOutputWrite; si.hStdError = pinfo->hPipeErrorWrite; - if (CreateProcess(NULL, pCommand, NULL, NULL, TRUE, 0, - environ, NULL, &si, &pi)) { + if (CreateProcess(NULL, pCommand, NULL, NULL, TRUE, 0, + NULL, NULL, &si, &pi)) { CloseHandle(pi.hProcess); CloseHandle(pi.hThread); child_pid = pi.dwProcessId;