Author: rjung
Date: Fri Sep 11 20:00:02 2009
New Revision: 814006
URL:
http://svn.apache.org/viewvc?rev=814006&view=rev
Log:
Only test whether the request actually maps to a file
if we need the file to execute the FCGI process.
In case a wrapper is defined, we don't execute the
request file. So the URL can be virtual.
Analogous to "Action ... virtual" when using CGI.
Modified:
httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c
Modified: httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c
URL:
http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c?rev=814006&r1=814005&r2=814006&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c (original)
+++ httpd/mod_fcgid/trunk/modules/fcgid/mod_fcgid.c Fri Sep 11 20:00:02 2009
@@ -147,12 +147,6 @@
if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r))
return HTTP_FORBIDDEN;
- if (r->finfo.filetype == 0)
- return HTTP_NOT_FOUND;
-
- if (r->finfo.filetype == APR_DIR)
- return HTTP_FORBIDDEN;
-
if ((r->used_path_info == AP_REQ_REJECT_PATH_INFO) &&
r->path_info && *r->path_info)
return HTTP_NOT_FOUND;
@@ -179,13 +173,20 @@
r->filename);
return HTTP_INTERNAL_SERVER_ERROR;
}
- } else if ((rv =
- cgi_build_command(&command, &argv, r, p,
- &e_info)) != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
- "mod_fcgid: don't know how to spawn child process: %s",
- r->filename);
- return HTTP_INTERNAL_SERVER_ERROR;
+ } else {
+ if (r->finfo.filetype == 0)
+ return HTTP_NOT_FOUND;
+
+ if (r->finfo.filetype == APR_DIR)
+ return HTTP_FORBIDDEN;
+
+ if ((rv = cgi_build_command(&command, &argv, r, p,
+ &e_info)) != APR_SUCCESS) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
+ "mod_fcgid: don't know how to spawn child process: %s",
+ r->filename);
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
}
/* Check request like "http://localhost/cgi-bin/a.exe/defghi" */
opensubscriber is not affiliated with the authors of this message nor responsible for its content.