ZF-10218: fix for amazon s3 query variables

Issue Type: Patch Created: 2010-07-23T22:44:47.000+0000 Last Updated: 2011-05-27T16:04:50.000+0000 Status: Resolved Fix version(s): - 1.11.7 (02/Jun/11)

Reporter: Jack Qiao (jack000) Assignee: Enrico Zimuel (zimuel) Tags: - Zend_Service_Amazon

Related issues: - ZF-10219



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.


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)

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.