From: Ian Jackson Date: Thu, 8 Aug 2019 11:30:56 +0000 (+0100) Subject: dgit: WWW::Curl: Double check that $response_body was set X-Git-Tag: archive/debian/9.7~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=5432ed2fb568a8c4acd34633162ee98711676111;p=dgit.git dgit: WWW::Curl: Double check that $response_body was set We are making some assumptions about how WWW::Curl behaves. This confess, with appropriate tests, should catch any future problems. Signed-off-by: Ian Jackson --- diff --git a/dgit b/dgit index f7b5025f..4bd2e053 100755 --- a/dgit +++ b/dgit @@ -1223,6 +1223,8 @@ sub url_fetch ($;@) { 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; }