Permalink
Browse files

Merge pull request #14 from ronaldxs/patch-4

Update lib/LWP/Simple.pm
  • Loading branch information...
2 parents 5701072 + 5c040e0 commit cd484d803442d605d4c30af917120a27147cb91d @cosimo committed Jul 30, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/LWP/Simple.pm
View
4 lib/LWP/Simple.pm
@@ -154,7 +154,9 @@ method make_request (
$sock.send($req_str);
# a bit crude w respect to err handling and blocking but ok for now
- my $resp = ~ gather for $sock.recv() xx * { .bytes ?? take $_ !! last };
+ my $resp = join '', gather loop {
+ my $s = $sock.recv; last unless $s.chars; take $s
+ };
$sock.close();
my ($status, $resp_headers, $resp_content) = self.parse_response($resp);

0 comments on commit cd484d8

Please sign in to comment.