summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-08-06 22:34:20 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-08-06 22:34:20 +0000
commit84cc58d013efc68f90c05e2c2458cbad059cf411 (patch)
tree159fa434c9f5ee7ab915cce6c475ce7a17239f0d
parent165a1d62c8f4475339481dda6c2c968bab1b506b (diff)
downloadphp-git-84cc58d013efc68f90c05e2c2458cbad059cf411.tar.gz
MFH: Fixed bug #24958 (Incorrect handling of 404s)
-rw-r--r--NEWS1
-rw-r--r--sapi/apache2handler/sapi_apache2.c18
2 files changed, 10 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index b4ddad7084..2131f898b1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Aug 2003, Version 4.3.3RC3
+- Fixed bug #24958 (Incorrect handling of 404s). (Ilia, Justin)
- Fixed bug #24936 (ext/fdf not linked properly as shared extension). (Jani)
- Fixed bug #24883 (variables_order and gpc_order being ignored). (Ilia)
- Fixed bug #24871 (methods misidentified as constructors). (Ilia)
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index d766b28011..93cc3fdab5 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -473,6 +473,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. */
@@ -503,15 +512,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);