ZF-10218: fix for amazon s3 query variables
Description
several amazon s3 operations require the use of query variables - eg. key?acl for updaing acl and bucket?versions for version tracking
this functionality is broken in zend 1.10.6. When using this operation:
_makeRequest('PUT', 'bucketname/?acl', array('acl'=>''), array('x-amz-acl'=>'private'))
an application error occurs: '?acl is not a valid http path'
my patch:
in S3.php, replace: $endpoint->setPath('/'.$parts[1]);
with: $pathparts = explode('?',$parts[1]); $endpath = $pathparts[0]; $endpoint->setPath('/'.$endpath);
basically strips the query string from the path before it's given to the endpoint.
Comments
Posted by Jack Qiao (jack000) on 2010-07-23T22:46:14.000+0000
that should have been
_makeRequest('PUT', 'bucketname/key?acl', array('acl'=>''), array('x-amz-acl'=>'private'))
Posted by Enrico Zimuel (zimuel) on 2011-05-27T15:56:01.000+0000
Fixed on trunk (commit 24053). I added the fix reported in the description.
Posted by Enrico Zimuel (zimuel) on 2011-05-27T15:59:55.000+0000
Resolved in branches/release-1.11 (commit 24054)