1
0
Fork 0

Fix headers array format

pull/9063/head
Jordi Boggiano 2020-07-17 17:29:00 +02:00
parent 8cec8bd546
commit 750a92b4b7
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 2 additions and 2 deletions

View File

@ -1139,7 +1139,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
if (isset($options['http']['header'])) { if (isset($options['http']['header'])) {
$options['http']['header'] = (array) $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); $response = $this->httpDownloader->get($filename, $options);
$json = $response->getBody(); $json = $response->getBody();
if ($json === '' && $response->getStatusCode() === 304) { if ($json === '' && $response->getStatusCode() === 304) {
@ -1207,7 +1207,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
if (isset($options['http']['header'])) { if (isset($options['http']['header'])) {
$options['http']['header'] = (array) $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; $io = $this->io;