summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-07-26 22:10:35 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-07-27 03:51:44 +0100
commitf58339ad566233a2e1252dcf309480029f84ab48 (patch)
tree41a9afbd9286c3cc21990b09882b0a2179203e84 /dgit
parentfc328b35ddc6e37c183383d5f8c6bb973dd0cc9b (diff)
Work around curl -sS -I printing `HTTP/1.0 200 Connection established' before the actual header, so dgit works with https_proxy set (!)
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit3
1 files changed, 3 insertions, 0 deletions
diff --git a/dgit b/dgit
index 867ba3c..660c0c3 100755
--- a/dgit
+++ b/dgit
@@ -1157,6 +1157,9 @@ sub check_for_git () {
my $url = "$prefix/$package$suffix";
my @cmd = (qw(curl -sS -I), $url);
my $result = cmdoutput @cmd;
+ $result =~ s/^\S+ 200 .*\n\r?\n//;
+ # curl -sS -I with https_proxy prints
+ # HTTP/1.0 200 Connection established
$result =~ m/^\S+ (404|200) /s or
fail "unexpected results from git check query - ".
Dumper($prefix, $result);