diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-08-06 22:33:18 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-08-06 22:33:18 +0000 |
commit | 10aae5e671ed19a8d74d64002e20d0fb08d7ee92 (patch) | |
tree | 54453950e5f28dc1e36994909fcf877bdedf7f75 /sapi/apache2handler/sapi_apache2.c | |
parent | c7a29109a82e9f5483b1453b2408c05b6946aa1b (diff) | |
download | php-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.c | 18 |
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); |