httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-1.3/src/main util_script.c
Date Wed, 15 Nov 2000 01:50:45 GMT
wrowe       00/11/14 17:50:45

  Modified:    src/main util_script.c
  Log:
    This is a further aspect of the Win9x problem with cgi scripts, some
    interpreters are choking on slash delimited scripts, so transpose all
    slash delimited commands to backslash path delimiters.
  
  Revision  Changes    Path
  1.155     +11 -0     apache-1.3/src/main/util_script.c
  
  Index: util_script.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/util_script.c,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- util_script.c	2000/11/14 09:57:11	1.154
  +++ util_script.c	2000/11/15 01:50:45	1.155
  @@ -1037,6 +1037,11 @@
                * Build the command string to pass to CreateProcess. 
                */
               quoted_filename = ap_pstrcat(r->pool, "\"", r->filename, "\"", NULL);
  +            for (i = 0; quoted_filename[i]; ++i) {
  +                if (quoted_filename[i] == '/')
  +                    quoted_filename[i] = '\\';
  +            }
  +
               if (interpreter && *interpreter) {
                   pCommand = ap_pstrcat(r->pool, interpreter, " ", 
                                         quoted_filename, " ", arguments, NULL);
  @@ -1049,6 +1054,12 @@
               char *shellcmd = getenv("COMSPEC");
               if (!shellcmd)
                   shellcmd = SHELL_PATH;
  +            
  +            quoted_filename = ap_pstrcat(r->pool, "\"", argv0, "\"", NULL);
  +            for (i = 0; quoted_filename[i]; ++i)
  +                if (quoted_filename[i] == '/')
  +                    quoted_filename[i] = '\\';
  +
               pCommand = ap_pstrcat(r->pool, shellcmd, " /C ", argv0, NULL);
           }
   
  
  
  

Mime
View raw message