Skip to content

Commit

Permalink
Update http chunked encoding test url
Browse files Browse the repository at this point in the history
  • Loading branch information
ugexe committed Sep 8, 2022
1 parent b211bab commit 23542dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xt/500-transport.rakutest
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ use Net::HTTP::URL;
use Net::HTTP::Request;

subtest 'Transfer-Encoding: chunked [IO::Socket::INET]' => {
my $url = Net::HTTP::URL.new('http://jigsaw.w3.org/HTTP/ChunkedScript');
my $url = Net::HTTP::URL.new('http://anglesharp.azurewebsites.net/Chunked');
my $req = Net::HTTP::Request.new: :$url, :method<GET>,
header => :Connection<keep-alive>, :User-Agent<raku-net-http>;

my $transport = Net::HTTP::Transport.new;
my $res = $transport.round-trip($req);
my $decoded = $res.body.decode;

is $decoded.lines.grep(/^0/).elems, 1000;
is $decoded.chars, 72200;
is $decoded.chars, 353;
}

subtest 'Threads: start { $transport.round-trip($req) }' => {
my $url = Net::HTTP::URL.new('http://jigsaw.w3.org/HTTP/ChunkedScript');
my $url = Net::HTTP::URL.new('http://anglesharp.azurewebsites.net/Chunked');
my $req = Net::HTTP::Request.new: :$url, :method<GET>,
header => :Connection<keep-alive>, :User-Agent<raku-net-http>;

Expand All @@ -28,7 +27,8 @@ subtest 'Threads: start { $transport.round-trip($req) }' => {
my @responses = await (start { $transport.round-trip($req) } xx $instances);

for @responses -> $res {
is $res.body.decode.lines.grep(/^0/).elems, 1000;
my $decoded = $res.body.decode;
is $decoded.chars, 353;
}
}

Expand Down

0 comments on commit 23542dc

Please sign in to comment.