From: Michael Wallner Date: Thu, 24 Aug 2006 08:18:19 +0000 (+0000) Subject: - add test for crash when detaching request from pool in callbacks X-Git-Tag: RELEASE_1_2_1~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=9b6cff9fb09a6a49d75439b03201f8e6c8995e22;p=m6w6%2Fext-http - add test for crash when detaching request from pool in callbacks --- diff --git a/package2.xml b/package2.xml index 5773d4d..406cada 100644 --- a/package2.xml +++ b/package2.xml @@ -42,6 +42,7 @@ support. Parallel requests are available for PHP 5 and greater. * Fixed issues with inheritance and cloning of HttpDeflateStream, HttpInflateStream and HttpMessage (Extending classes lose default properties on instantiation; Complex members ignored during cloning) * Fixed suppression of nested exceptions in e.g. HttpRequestPool::send() +* Fixed crash on detaching requests from pool in request event callbacks ]]> @@ -197,6 +198,7 @@ support. Parallel requests are available for PHP 5 and greater. + diff --git a/tests/HttpRequestPool_006.phpt b/tests/HttpRequestPool_006.phpt new file mode 100644 index 0000000..9d788ad --- /dev/null +++ b/tests/HttpRequestPool_006.phpt @@ -0,0 +1,32 @@ +--TEST-- +HttpRequestPool detaching in callbacks +--SKIPIF-- + +--FILE-- +detach($this); + } +} +class r2 extends HttpRequest { + function onFinish() { + $GLOBALS['p']->detach($this); + } +} +$p = new HttpRequestPool(new r1("at.php.net"), new r2("de.php.net")); +$p->send(); +var_dump($p->getAttachedRequests()); +echo "Done\n"; +?> +--EXPECTF-- +%sTEST +array(0) { +} +Done