]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix the rewrite_map program invocation for Win32. Someone borrowed
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 21 Jun 2004 18:31:27 +0000 (18:31 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 21 Jun 2004 18:31:27 +0000 (18:31 +0000)
  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

src/modules/standard/mod_rewrite.c

index 30d27be0d0dc63d109963f107b6bea40dcaf51d2..86f7d90a880817c6fee0d292a94f94851e9f454f 100644 (file)
@@ -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;