iliaa Wed Aug 17 21:15:23 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/sapi/apache2handler sapi_apache2.c
Log:
MFH: Fixed bug #33987 (php script as ErrorDocument causes crash in Apache 2).
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.40.2.9&r2=1.40.2.10&ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.9
php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.10
--- php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.9 Mon Jun 20 08:46:52 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c Wed Aug 17 21:15:23 2005
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.40.2.9 2005/06/20 12:46:52 tony2001 Exp $ */
+/* $Id: sapi_apache2.c,v 1.40.2.10 2005/08/18 01:15:23 iliaa Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -506,6 +506,7 @@
ctx = SG(server_context);
if (ctx == NULL) {
+normal:
ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
/* register a cleanup so we clear out the SG(server_context)
* after each request. Note: We pass in the pointer to the
@@ -522,6 +523,11 @@
}
} else {
parent_req = ctx->r;
+ /* check if comming due to ErrorDocument */
+ if (parent_req != HTTP_OK) {
+ parent_req = NULL;
+ goto normal;
+ }
ctx->r = r;
brigade = ctx->brigade;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php