Issue Details (XML | Word | Printable)

Key: ZF-6540
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Stanislav Malyshev
Reporter: Gianluca Sforna
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

Zend_Serivce_Amazon_S3 should urlencode the filename/objectname before using it

Created: 05/May/09 08:20 AM   Updated: 08/May/09 01:58 PM   Resolved: 08/May/09 01:58 PM
Component/s: Zend_Service_Amazon
Affects Version/s: 1.8.0
Fix Version/s: 1.8.1

Time Tracking:
Not Specified


 Description  « Hide

Right now the Amazon S3 component is not able to work on filenames/objectnames containing chars unsuitable for URL. A small test case:

include "Zend/Service/Amazon/S3.php";
$zend = new Zend_Service_Amazon_S3(key1,key2);
$zend->putObject( "giallutest/this is a test", "HELLO WORLD!" );

fails with:
PHP Fatal error: Uncaught exception 'Zend_Uri_Exception' with message 'Invalid URI supplied' in /home/giallu/Desktop/zend/ZendFramework-1.8.0-minimal/library/Zend/Uri/Http.php:156

The solution to this problem, as noted in:
http://developer.amazonwebservices.com/connect/thread.jspa?threadID=15787&tstart=45
is to always urlencode() the object name.

Please also note the Zend_Serivce_Amazon_S3 component is missing from this tracker...



Matthew Weier O'Phinney added a comment - 05/May/09 08:50 AM

Assigning to Stas


Stanislav Malyshev added a comment - 08/May/09 01:58 PM

fixed, thanks