response_too_large.t (434B)
1 use strict; 2 use Test; 3 use SL::Test; 4 5 BEGIN { plan tests => 25 } 6 7 # Test that a message greater than 65KB doesn't get sent 8 my $s = SL::Test::Server->new(); 9 my $A = SL::Test::Client->new(); 10 11 $A->list_add({ name => 'a' x 4000, date => 0 }) for (1..20); 12 13 # This request should be 20 * 4000 Bytes = ~80KB 14 my $err = $A->lists_get('err'); 15 ok($err, 'response too large'); 16 ok($s->readline(), "/error: 82135 byte response too large to send/");