httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garey Smiley" <ga...@main.slink.com>
Subject PR #59 fix for OS/2
Date Mon, 03 Mar 1997 00:37:26 GMT
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

Mime
View raw message