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 http_core.c
Date Wed, 15 Nov 2000 01:44:14 GMT
wrowe       00/11/14 17:44:14

  Modified:    src/main http_core.c
  Log:
    This is definately -part- of the win9x issues, we want a bit more
    control over CreateProcess than trying to spawn a batch file, so
    we wrap it in the ComSpec.  Tested, and it the process is created
    as expected, e.g. "c:\windows\command.com" /C "c:\web\cgi-bin\why.bat"
  
  Revision  Changes    Path
  1.291     +5 -1      apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.290
  retrieving revision 1.291
  diff -u -r1.290 -r1.291
  --- http_core.c	2000/11/14 09:57:08	1.290
  +++ http_core.c	2000/11/15 01:44:13	1.291
  @@ -897,7 +897,11 @@
       ext = strrchr(exename, '.');
   
       if (ext && (!strcasecmp(ext,".bat") || !strcasecmp(ext,".cmd"))) {
  -        return eFileTypeEXE32;
  +        char *shellcmd = getenv("COMSPEC");
  +        if (!shellcmd)
  +            shellcmd = SHELL_PATH;
  +        *interpreter = ap_pstrcat(r->pool, "\"", shellcmd, "\" /C", NULL);
  +        return eFileTypeSCRIPT;
       }
   
       /* If the file has an extension and it is not .com and not .exe and
  
  
  

Mime
View raw message