Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix setMetadata() on metastore.s3 plugin, broken for non-ascii chars,…
… the CopySource parameter must be urlencoded.
  • Loading branch information
cdujeu committed Mar 11, 2015
1 parent d62e2da commit 74cb7d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/plugins/metastore.s3/class.s3MetaStore.php
Expand Up @@ -112,7 +112,7 @@ public function setMetadata($ajxpNode, $nameSpace, $metaData, $private = false,
array(
'Bucket' => $this->bucketName,
'Key' => $pathName,
'CopySource' => $this->bucketName."/".$pathName,
'CopySource' => $this->bucketName."/".urlencode($pathName),
'MetadataDirective' => 'REPLACE',
'Metadata' => array($this->getMetaKey($nameSpace,$scope,$user) => base64_encode(serialize($metaData)))
)
Expand All @@ -131,7 +131,7 @@ public function removeMetadata($ajxpNode, $nameSpace, $private = false, $scope=A
array(
'Bucket' => $this->bucketName,
'Key' => $pathName,
'CopySource' => $this->bucketName."/".$pathName,
'CopySource' => $this->bucketName."/".urlencode($pathName),
'MetadataDirective' => 'REPLACE',
'Metadata' => array($this->getMetaKey($nameSpace,$scope,$user) => "")
)
Expand Down

0 comments on commit 74cb7d5

Please sign in to comment.