Skip to content

Commit

Permalink
RFC: Follow redirects when downloading assets for cloning
Browse files Browse the repository at this point in the history
Note: Untested by me as I couldn't reproduce the issue.
  • Loading branch information
kalikiana committed Oct 18, 2023
1 parent b25b3ea commit 407cbc2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/OpenQA/Script/CloneJob.pm
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ sub clone_job_download_assets ($jobid, $job, $url_handler, $options) {

print STDERR "downloading\n$from\nto\n$dst\n";
my $r = $ua->mirror($from, $dst);
$r = $ua->mirror($r->header('Location'), $dst) if ($r->code == 308);
unless ($r->is_success || $r->code == 304) {
print STDERR "$jobid failed: $file, ", $r->status_line, "\n";
die "Can't clone due to missing assets: ", $r->status_line, " \n"
Expand Down

0 comments on commit 407cbc2

Please sign in to comment.