Fix contructing headers for s3 download

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2017-11-08 17:50:46 +01:00
parent 2d8d248d28
commit a21f2c2813
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
1 changed files with 7 additions and 1 deletions

View File

@ -50,9 +50,15 @@ trait S3ObjectTrait {
'Key' => $urn
]);
$request = \Aws\serialize($command);
$headers = [];
foreach ($request->getHeaders() as $key => $values) {
foreach ($values as $value) {
$headers[] = "$key: $value";
}
}
$opts = [
'http' => [
'header' => $request->getHeaders()
'header' => $headers
]
];