iliaa Wed Aug 6 18:34:21 2003 EDT Modified files: (Branch: PHP_4_3) /php-src NEWS /php-src/sapi/apache2handler sapi_apache2.c Log: MFH: Fixed bug #24958 (Incorrect handling of 404s) Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.327 php-src/NEWS:1.1247.2.328 --- php-src/NEWS:1.1247.2.327 Tue Aug 5 16:16:47 2003 +++ php-src/NEWS Wed Aug 6 18:34:20 2003 @@ -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) Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.20 php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.21 --- php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.20 Sun Aug 3 07:23:25 2003 +++ php-src/sapi/apache2handler/sapi_apache2.c Wed Aug 6 18:34:20 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.1.2.20 2003/08/03 11:23:25 thetaphi Exp $ */ +/* $Id: sapi_apache2.c,v 1.1.2.21 2003/08/06 22:34:20 iliaa Exp $ */ #include <fcntl.h> @@ -473,6 +473,15 @@ 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. */ @@ -501,15 +510,6 @@ parent_req = ctx->r; ctx->r = 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)) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php