Fix headers array format
parent
8cec8bd546
commit
750a92b4b7
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue