From 750a92b4b7aecda0e5b2f9b963f1cb1421900675 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 17 Jul 2020 17:29:00 +0200 Subject: [PATCH] Fix headers array format --- src/Composer/Repository/ComposerRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Repository/ComposerRepository.php b/src/Composer/Repository/ComposerRepository.php index 78c6cf495..d3db3069c 100644 --- a/src/Composer/Repository/ComposerRepository.php +++ b/src/Composer/Repository/ComposerRepository.php @@ -1139,7 +1139,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito if (isset($options['http']['header'])) { $options['http']['header'] = (array) $options['http']['header']; } - $options['http']['header'][] = array('If-Modified-Since: '.$lastModifiedTime); + $options['http']['header'][] = 'If-Modified-Since: '.$lastModifiedTime; $response = $this->httpDownloader->get($filename, $options); $json = $response->getBody(); if ($json === '' && $response->getStatusCode() === 304) { @@ -1207,7 +1207,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito if (isset($options['http']['header'])) { $options['http']['header'] = (array) $options['http']['header']; } - $options['http']['header'][] = array('If-Modified-Since: '.$lastModifiedTime); + $options['http']['header'][] = 'If-Modified-Since: '.$lastModifiedTime; } $io = $this->io;