diff options
author | Christian Schneider | 2024-05-27 15:10:38 +0200 |
---|---|---|
committer | Christian Schneider | 2024-05-27 15:10:38 +0200 |
commit | 134e639995c9a7a930da31c5b615d51997d0d177 (patch) | |
tree | 624d0965f8bf03ac91a4c36c757304bde1e24590 /test | |
parent | b484fab88a9229f7c87ea053564d0d8d3d2a565d (diff) | |
download | itools-134e639995c9a7a930da31c5b615d51997d0d177.tar.gz itools-134e639995c9a7a930da31c5b615d51997d0d177.tar.bz2 itools-134e639995c9a7a930da31c5b615d51997d0d177.zip |
Fix it_url::get with maxlength and large response
Diffstat (limited to 'test')
-rwxr-xr-x | test/it_url_slow.t | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/it_url_slow.t b/test/it_url_slow.t index 59afe7e..b382b3a 100755 --- a/test/it_url_slow.t +++ b/test/it_url_slow.t @@ -74,6 +74,14 @@ handle_server( ) ); + +handle_server( + ok( + it_url::get('url' => U("http://$host/repeat", ['string' => "abc", 'num' => 1024 * 32]), 'maxlength' => 1024 * 1024) == str_repeat("abc", 1024 * 32), + 'it_url::get() handles large response with maxlength set' + ) +); + $start = microtime(true); it_url::get_multi(['urls' => ['slow' => "http://$host/long_sleep", 'fast' => ['url' => 'http://search.ch/', 'handler' => function () {return true;}]]]); ok(intval(microtime(true) - $start) < 4, 'get_multi with handler aborts after fast request'); |