1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

mk-ca-bundle.pl: Check curl's exit code after certdata download

- No longer allow partial downloads of certdata.

Prior to this change partial downloads were (erroneously?) allowed since
only the server code was checked to be 200.

Bug: https://github.com/curl/curl/pull/1577
Reported-by: Matteo B.
This commit is contained in:
Jay Satiro 2017-06-16 01:58:23 -04:00
parent 615326fd99
commit ec92afc3f4

View File

@ -310,7 +310,7 @@ if(!$opt_n) {
my $proto = !$opt_k ? "--proto =https" : "";
my $quiet = $opt_q ? "-s" : "";
my @out = `curl -w %{response_code} $proto $quiet -o "$txt" "$url"`;
if(@out && $out[0] == 200) {
if(!$? && @out && $out[0] == 200) {
$fetched = 1;
report "Downloaded $txt";
}