iliaa Wed Aug 6 18:33:18 2003 EDT
Modified files:
/php-src/sapi/apache2handler sapi_apache2.c
Log:
Fixed bug #24958 (Incorrect handling of 404s)
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.25
php-src/sapi/apache2handler/sapi_apache2.c:1.26
--- php-src/sapi/apache2handler/sapi_apache2.c:1.25 Sun Aug 3 07:22:53 2003
+++ php-src/sapi/apache2handler/sapi_apache2.c Wed Aug 6 18:33:18 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.25 2003/08/03 11:22:53 thetaphi Exp $ */
+/* $Id: sapi_apache2.c,v 1.26 2003/08/06 22:33:18 iliaa Exp $ */
#include <fcntl.h>
@@ -468,6 +468,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. */
@@ -496,15 +505,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