summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorTom N Harris <tnharris@whoopdedo.org>2012-06-20 03:00:18 -0400
committerTom N Harris <tnharris@whoopdedo.org>2012-06-20 03:00:18 -0400
commit769b429a77368df14e3753f624466f658e971df6 (patch)
tree306216ba947cf3ebbea4ad11b88ccd0aa7239dac /_test
parentfbf63b6e769b92fc1964c09132dfc937910d04f3 (diff)
downloadrpg-769b429a77368df14e3753f624466f658e971df6.tar.gz
rpg-769b429a77368df14e3753f624466f658e971df6.tar.bz2
HTTPClient will read up to max_bodysize if it can
Diffstat (limited to '_test')
-rw-r--r--_test/tests/inc/httpclient_http.test.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/_test/tests/inc/httpclient_http.test.php b/_test/tests/inc/httpclient_http.test.php
index cf8137152..c3ee182dc 100644
--- a/_test/tests/inc/httpclient_http.test.php
+++ b/_test/tests/inc/httpclient_http.test.php
@@ -124,6 +124,12 @@ class httpclient_http_test extends DokuWikiTest {
$http->max_bodysize = 250;
$data = $http->get($this->server.'/stream/30');
$this->assertTrue($data === false, 'HTTP response');
+ $http->max_bodysize_abort = false;
+ $data = $http->get($this->server.'/stream/30');
+ $this->assertFalse($data === false, 'HTTP response');
+ /* the current implementation will read in max_bodysize blocks,
+ and aborts if the response is larger, thus a limit of 2*max_bodysize */
+ $this->assertLessThanOrEqual(500,strlen($data));
}
/**