mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Make github driver code more robust
This commit is contained in:
parent
6be57475ac
commit
97d09a9b77
1 changed files with 2 additions and 2 deletions
|
@ -512,8 +512,8 @@ class GitHubDriver extends VcsDriver
|
|||
{
|
||||
$headers = $this->remoteFilesystem->getLastHeaders();
|
||||
foreach ($headers as $header) {
|
||||
if (substr($header, 0, 5) === 'Link:') {
|
||||
$links = explode(',', substr($header, 5));
|
||||
if (preg_match('{^link:\s*(.+?)\s*$}i', $header, $match)) {
|
||||
$links = explode(',', $match[1]);
|
||||
foreach ($links as $link) {
|
||||
if (preg_match('{<(.+?)>; *rel="next"}', $link, $match)) {
|
||||
return $match[1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue