From 0fc541eee4fe00b93911d7b1b1b4d6a9072889b5 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Fri, 23 May 2025 09:37:23 +0200 Subject: add test for maxlength with compression enabled --- test/it_url_slow.t | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/it_url_slow.t') diff --git a/test/it_url_slow.t b/test/it_url_slow.t index 00bbc2f..a5fd348 100755 --- a/test/it_url_slow.t +++ b/test/it_url_slow.t @@ -67,6 +67,13 @@ $output = server_output(); if (!$res || !$res2) diag($output); +handle_server( + ok( + !it_url::get(['url' => "http://$host/repeat?string=abcdefghijklmnop&num=10&compressed", 'maxlength' => 100, 'retries' => 0, 'it_error' => false]), + 'it_url::get() fails for response larger than maxlength even if compressed response is smaller' + ) +); + handle_server( ok( it_url::get(U("http://$host/repeat", ['string' => "abc", 'num' => 1024 * 1024])) == str_repeat("abc", 1024 * 1024), -- cgit v1.2.3