1
0
Fork 0

Try fixing 404s gitlab handling when unauthenticated, refs #6669

pull/6637/merge
Jordi Boggiano 2017-09-11 14:41:33 +02:00
parent 56964a9377
commit f71baa5e0c
1 changed files with 11 additions and 0 deletions

View File

@ -354,6 +354,17 @@ class RemoteFilesystem
} }
} }
// check for gitlab 404 when downloading archives
if ($statusCode === 404
&& $this->config && in_array($originUrl, $this->config->get('gitlab-domains'), true)
&& false !== strpos($fileUrl, 'archive.zip')
) {
$result = false;
if ($this->retryAuthFailure) {
$this->promptAuthAndRetry(401);
}
}
// handle 3xx redirects for php<5.6, 304 Not Modified is excluded // handle 3xx redirects for php<5.6, 304 Not Modified is excluded
$hasFollowedRedirect = false; $hasFollowedRedirect = false;
if ($userlandFollow && $statusCode >= 300 && $statusCode <= 399 && $statusCode !== 304 && $this->redirects < $this->maxRedirects) { if ($userlandFollow && $statusCode >= 300 && $statusCode <= 399 && $statusCode !== 304 && $this->redirects < $this->maxRedirects) {