tony2001 Wed Oct 12 17:41:37 2005 EDT Modified files: (Branch: PHP_4_4) /php-src/sapi/apache2handler sapi_apache2.c Log: MF51: fix bug #34581 (crash with mod_rewrite) http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.1.2.40.2.4&r2=1.1.2.40.2.5&ty=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.40.2.4 php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.40.2.5 --- php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.40.2.4 Tue Oct 4 20:50:11 2005 +++ php-src/sapi/apache2handler/sapi_apache2.c Wed Oct 12 17:41:36 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.1.2.40.2.4 2005/10/05 00:50:11 iliaa Exp $ */ +/* $Id: sapi_apache2.c,v 1.1.2.40.2.5 2005/10/12 21:41:36 tony2001 Exp $ */ #include <fcntl.h> @@ -472,6 +472,7 @@ ctx->r = r; ctx = NULL; /* May look weird to null it here, but it is to catch the right case in the first_try later on */ } else { + parent_req = ctx->r; ctx->r = r; } apply_config(conf); @@ -531,7 +532,15 @@ zend_bailout(); } } else { - parent_req = ctx->r; + if (!parent_req) { + parent_req = ctx->r; + } + if (parent_req && strcmp(parent_req->handler, PHP_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(parent_req->handler, PHP_SCRIPT)) { + if (php_apache_request_ctor(r, ctx TSRMLS_CC)!=SUCCESS) { + zend_bailout(); + } + } + /* check if comming due to ErrorDocument */ if (parent_req && parent_req->status != HTTP_OK) { parent_req = NULL;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php