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 497cd7fa4e
commit 70a4860ccb
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
1 changed files with 7 additions and 1 deletions

View File

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