iliaa Fri Aug 1 16:20:11 2003 EDT Modified files: /php-src/sapi/apache2handler sapi_apache2.c /php-src/sapi/apache2filter sapi_apache2.c Log: Fixed bug #22072 (Apache2 sapis do not detect aborted connections). Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.22 php-src/sapi/apache2handler/sapi_apache2.c:1.23 --- php-src/sapi/apache2handler/sapi_apache2.c:1.22 Fri Jul 11 00:23:34 2003 +++ php-src/sapi/apache2handler/sapi_apache2.c Fri Aug 1 16:20:11 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.22 2003/07/11 04:23:34 sniper Exp $ */ +/* $Id: sapi_apache2.c,v 1.23 2003/08/01 20:20:11 iliaa Exp $ */ #include <fcntl.h> @@ -88,7 +88,7 @@ APR_BRIGADE_INSERT_TAIL(brigade, bucket); - if (ap_pass_brigade(r->output_filters, brigade) != APR_SUCCESS) { + if (ap_pass_brigade(r->output_filters, brigade) != APR_SUCCESS || r->connection->aborted) { php_handle_aborted_connection(); } /* Ensure this brigade is empty for the next usage. */ @@ -258,7 +258,7 @@ /* Send a flush bucket down the filter chain. */ bucket = apr_bucket_flush_create(r->connection->bucket_alloc); APR_BRIGADE_INSERT_TAIL(brigade, bucket); - if (ap_pass_brigade(r->output_filters, brigade) != APR_SUCCESS) { + if (ap_pass_brigade(r->output_filters, brigade) != APR_SUCCESS || r->connection->aborted) { php_handle_aborted_connection(); } apr_brigade_cleanup(brigade); @@ -545,7 +545,7 @@ APR_BRIGADE_INSERT_TAIL(brigade, bucket); rv = ap_pass_brigade(r->output_filters, brigade); - if (rv != APR_SUCCESS) { + if (rv != APR_SUCCESS || r->connection->aborted) { php_handle_aborted_connection(); } apr_brigade_cleanup(brigade); Index: php-src/sapi/apache2filter/sapi_apache2.c diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.116 php-src/sapi/apache2filter/sapi_apache2.c:1.117 --- php-src/sapi/apache2filter/sapi_apache2.c:1.116 Fri Jul 11 00:23:34 2003 +++ php-src/sapi/apache2filter/sapi_apache2.c Fri Aug 1 16:20:11 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.116 2003/07/11 04:23:34 sniper Exp $ */ +/* $Id: sapi_apache2.c,v 1.117 2003/08/01 20:20:11 iliaa Exp $ */ #include <fcntl.h> @@ -91,7 +91,7 @@ APR_BRIGADE_INSERT_TAIL(bb, b); #endif - if (ap_pass_brigade(f->next, bb) != APR_SUCCESS) { + if (ap_pass_brigade(f->next, bb) != APR_SUCCESS || ctx->r->connection->aborted) { php_handle_aborted_connection(); } @@ -253,7 +253,7 @@ bb = apr_brigade_create(ctx->r->pool, ba); b = apr_bucket_flush_create(ba); APR_BRIGADE_INSERT_TAIL(bb, b); - if (ap_pass_brigade(f->next, bb) != APR_SUCCESS) { + if (ap_pass_brigade(f->next, bb) != APR_SUCCESS || ctx->r->connection->aborted) { php_handle_aborted_connection(); } } @@ -477,7 +477,7 @@ rv = ap_pass_brigade(f->next, prebb); /* XXX: destroy the prebb, since we know we're * done with it? */ - if (rv != APR_SUCCESS) { + if (rv != APR_SUCCESS || ctx->r->connection->aborted) { php_handle_aborted_connection(); } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php