iliaa           Wed Aug 17 21:15:54 2005 EDT

  Modified files:              (Branch: PHP_4_4)
    /php-src/sapi/apache2handler        sapi_apache2.c 
    /php-src    NEWS 
  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.1.2.40.2.1&r2=1.1.2.40.2.2&ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.40.2.1 
php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.40.2.2
--- php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.40.2.1     Mon Jul 25 
16:36:36 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c  Wed Aug 17 21:15:52 2005
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: sapi_apache2.c,v 1.1.2.40.2.1 2005/07/25 20:36:36 rasmus Exp $ */
+/* $Id: sapi_apache2.c,v 1.1.2.40.2.2 2005/08/18 01:15:52 iliaa Exp $ */
 
 #include <fcntl.h>
 
@@ -527,6 +527,7 @@
 zend_first_try {
 
        if (ctx == NULL) {
+normal:
                brigade = apr_brigade_create(r->pool, 
r->connection->bucket_alloc);
                ctx = SG(server_context);
                ctx->brigade = brigade;
@@ -536,6 +537,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;
        }
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.920.2.26&r2=1.1247.2.920.2.27&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.26 php-src/NEWS:1.1247.2.920.2.27
--- php-src/NEWS:1.1247.2.920.2.26      Tue Aug 16 10:12:13 2005
+++ php-src/NEWS        Wed Aug 17 21:15:53 2005
@@ -7,6 +7,8 @@
 - Fixed bug #34064 (arr[] as param to function is allowed only if function 
   receives argument by reference). (Dmitry)
 - Fixed bug #33989 (extract($GLOBALS,EXTR_REFS) crashes PHP). (Dmitry)
+- Fixed bug #33987 (php script as ErrorDocument causes crash in Apache 2).
+  (Ilia)
 - Fixed bug #33940 (array_map() fails to pass by reference when called
   recursively). (Dmitry)
 - Fixed bug #33690 (Crash setting some ini directives in httpd.conf). (Rasmus)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to