projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- fix infinite loop with http_parse_params("=")
[m6w6/ext-http]
/
tests
/
HttpRequestPool_002.phpt
diff --git
a/tests/HttpRequestPool_002.phpt
b/tests/HttpRequestPool_002.phpt
index 053f1f6b76804c3d769b229c516f1f3e4aeaf1dd..a85e81755efa0e0caf97ff76d5c82958ed6540a2 100644
(file)
--- a/
tests/HttpRequestPool_002.phpt
+++ b/
tests/HttpRequestPool_002.phpt
@@
-4,6
+4,10
@@
extending HttpRequestPool
<?php
include 'skip.inc';
checkcls('HttpRequestPool');
<?php
include 'skip.inc';
checkcls('HttpRequestPool');
+checkurl('ch.php.net');
+checkurl('at.php.net');
+checkurl('de.php.net');
+checkurl('www.php.net');
?>
--FILE--
<?php
?>
--FILE--
<?php
@@
-14,21
+18,23
@@
class MyPool extends HttpRequestPool
public function send()
{
while ($this->socketPerform()) {
public function send()
{
while ($this->socketPerform()) {
- $this->handleRequests();
if (!$this->socketSelect()) {
throw new HttpSocketException;
}
}
if (!$this->socketSelect()) {
throw new HttpSocketException;
}
}
- $this->handleRequests();
}
}
- pr
ivate function handleRequests
()
+ pr
otected final function socketPerform
()
{
{
+ $result = parent::socketPerform();
+
echo ".";
foreach ($this->getFinishedRequests() as $r) {
echo "=", $r->getResponseCode(), "=";
$this->detach($r);
}
echo ".";
foreach ($this->getFinishedRequests() as $r) {
echo "=", $r->getResponseCode(), "=";
$this->detach($r);
}
+
+ return $result;
}
}
}
}
@@
-45,5
+51,5
@@
echo "\nDone\n";
?>
--EXPECTREGEX--
.+TEST
?>
--EXPECTREGEX--
.+TEST
-\.
+=200=\.+=200=\.+=200=\.+
=200=
+\.
*=200=\.*=200=\.*=200=\.*
=200=
Done
Done