ZF-10218: fix for amazon s3 query variables


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.


that should have been

_makeRequest('PUT', 'bucketname/key?acl', array('acl'=>''), array('x-amz-acl'=>'private'))

Fixed on trunk (commit 24053). I added the fix reported in the description.

Resolved in branches/release-1.11 (commit 24054)