From 5432ed2fb568a8c4acd34633162ee98711676111 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 8 Aug 2019 12:30:56 +0100 Subject: [PATCH] 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 --- dgit | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.30.2