You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Garey Smiley <ga...@main.slink.com> on 1997/03/03 01:37:26 UTC

PR #59 fix for OS/2

The following diff should close PR #59. The diff file attatched has
been filtered for CR-LF that caused problems before.

*** mod_cgi.c.orig	Fri Jan 24 19:08:32 1997
--- mod_cgi.c	Sun Mar  2 18:15:48 1997
***************
*** 375,383 ****
--- 375,396 ----
      if (S_ISDIR(r->finfo.st_mode))
          return log_scripterror(r, conf, FORBIDDEN,
                                 "attempt to invoke directory as
script");
+ #ifdef __EMX__
+     /* Allow for cgi files without the .EXE extension on them under
OS/2 */
+     if (r->finfo.st_mode == 0) {
+         struct stat statbuf;
+         
+         r->filename = pstrcat (r->pool, r->filename, ".EXE", NULL);  
     
+         if ((stat(r->filename, &statbuf) != 0) ||
(!S_ISREG(statbuf.st_mode))) {
+             return log_scripterror(r, conf, NOT_FOUND,
+                                    "script not found or unable to
stat");
+         }
+     }
+ #else                                   
      if (r->finfo.st_mode == 0)
          return log_scripterror(r, conf, NOT_FOUND,
                                 "script not found or unable to stat");
+ #endif                               
      if (!suexec_enabled) {
          if (!can_exec(&r->finfo))
              return log_scripterror(r, conf, FORBIDDEN,


Garey Smiley
SoftLink Services
garey@slink.com
http://www.slink.com/
(330)848-1312 FAX/Data(330)699-4474