confess "$k $v ".$curl->strerror($x)." ?" if $x;
};
- my $response_body;
+ my $response_body = '';
$setopt->(CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTPS|CURLPROTO_HTTP);
$setopt->(CURLOPT_URL, $url);
$setopt->(CURLOPT_NOSIGNAL, 1);
fail f_ "fetch of %s gave HTTP code %s", $url, $code
unless $url =~ m#^file://# or $code =~ m/^2/;
+
+ confess unless defined $response_body;
return $response_body;
}