Skip to content

Update lib/LWP/Simple.pm #13

Merged
merged 1 commit into from Jul 29, 2012
+2 −1
View
3 lib/LWP/Simple.pm
@@ -153,7 +153,8 @@ method make_request (
$sock.send($req_str);
- my $resp = $sock.recv();
+ # a bit crude w respect to err handling and blocking but ok for now
+ my $resp = ~ gather for $sock.recv() xx * { .bytes ?? take $_ !! last };
$sock.close();
my ($status, $resp_headers, $resp_content) = self.parse_response($resp);
Something went wrong with that request. Please try again.