summaryrefslogtreecommitdiff
path: root/sapi/apache2handler/sapi_apache2.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-08-06 22:33:18 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-08-06 22:33:18 +0000
commit10aae5e671ed19a8d74d64002e20d0fb08d7ee92 (patch)
tree54453950e5f28dc1e36994909fcf877bdedf7f75 /sapi/apache2handler/sapi_apache2.c
parentc7a29109a82e9f5483b1453b2408c05b6946aa1b (diff)
downloadphp-git-10aae5e671ed19a8d74d64002e20d0fb08d7ee92.tar.gz
Fixed bug #24958 (Incorrect handling of 404s)
Diffstat (limited to 'sapi/apache2handler/sapi_apache2.c')
-rw-r--r--sapi/apache2handler/sapi_apache2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 2f399303de..4982a740d4 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -468,6 +468,15 @@ static int php_handler(request_rec *r)
return DECLINED;
}
+ if (r->finfo.filetype == 0) {
+ php_apache_sapi_log_message("script not found or unable to stat");
+ return HTTP_NOT_FOUND;
+ }
+ if (r->finfo.filetype == APR_DIR) {
+ php_apache_sapi_log_message("attempt to invoke directory as script");
+ return HTTP_FORBIDDEN;
+ }
+
/* Setup the CGI variables if this is the main request */
if (r->main == NULL ||
/* .. or if the sub-request envinronment differs from the main-request. */
@@ -498,15 +507,6 @@ static int php_handler(request_rec *r)
brigade = ctx->brigade;
}
- if (r->finfo.filetype == 0) {
- php_apache_sapi_log_message("script not found or unable to stat");
- return HTTP_NOT_FOUND;
- }
- if (r->finfo.filetype == APR_DIR) {
- php_apache_sapi_log_message("attempt to invoke directory as script");
- return HTTP_FORBIDDEN;
- }
-
if (AP2(last_modified)) {
ap_update_mtime(r, r->finfo.mtime);
ap_set_last_modified(r);