marc 98/10/31 17:08:45
Modified: src/modules/standard mod_cgi.c
Log:
If we can't find a script and magically try adding ".EXE" to it, then
do not log can't find foo.EXE, but just foo. This avoids confusing
people.
Revision Changes Path
1.87 +5 -2 apache-1.3/src/modules/standard/mod_cgi.c
Index: mod_cgi.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_cgi.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- mod_cgi.c 1998/09/21 21:09:51 1.86
+++ mod_cgi.c 1998/11/01 01:08:45 1.87
@@ -386,12 +386,15 @@
/* Allow for cgi files without the .EXE extension on them under OS/2 */
if (r->finfo.st_mode == 0) {
struct stat statbuf;
+ char *newfile;
- r->filename = ap_pstrcat(r->pool, r->filename, ".EXE", NULL);
+ newfile = ap_pstrcat(r->pool, r->filename, ".EXE", NULL);
- if ((stat(r->filename, &statbuf) != 0) || (!S_ISREG(statbuf.st_mode))) {
+ if ((stat(newfile, &statbuf) != 0) || (!S_ISREG(statbuf.st_mode))) {
return log_scripterror(r, conf, NOT_FOUND, 0,
"script not found or unable to stat");
+ } else {
+ r->filename = newfile;
}
}
#else