summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2019-08-08 12:30:56 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2019-08-11 00:09:28 +0100
commit5432ed2fb568a8c4acd34633162ee98711676111 (patch)
tree965af6b1d5aba328266429042fc6fadea0ef462e
parentbbc8063258e22fb5270d27f3d5c74215c88a8785 (diff)
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 <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xdgit2
1 files changed, 2 insertions, 0 deletions
diff --git a/dgit b/dgit
index f7b5025..4bd2e05 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;
}