diff --git a/lib/OpenQA/Script/CloneJob.pm b/lib/OpenQA/Script/CloneJob.pm index bcf81cad4cf..e429fdc73ad 100644 --- a/lib/OpenQA/Script/CloneJob.pm +++ b/lib/OpenQA/Script/CloneJob.pm @@ -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"