Zend Framework

Zend_Service_Amazon_S3::isObjectAvailable() fails on paths containing spaces

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.10.5
  • Fix Version/s: 1.11.0
  • Component/s: Zend_Service_Amazon
  • Labels:
    None

Description

All public methods on Zend_Service_Amazon_S3 operating on objects internally call _fixupObjectName() to rawurlencode path parts.

Except, isObjectAvailable() does not do that. So, this code fails:

$objectName = 'mybucket/path with spaces/file.txt';
$s3->putObject('path/to/file.txt', $objectName); // OK, file is uploaded
$s3->isObjectAvailable($objectName); // throws Zend_Uri_Exception due to spaces in the object path

The solution is to add a call to _fixupObjectName($object) in isObjectAvailable().

Issue Links

Activity

Hide
Marc Hodgins added a comment -

Patch with test attached.

Show
Marc Hodgins added a comment - Patch with test attached.
Hide
Matthew Weier O'Phinney added a comment -

Applied to trunk and 1.11 release branch. Not sure if we'll do another RC to reflect this change, or simply incorporate it into the final release.

Show
Matthew Weier O'Phinney added a comment - Applied to trunk and 1.11 release branch. Not sure if we'll do another RC to reflect this change, or simply incorporate it into the final release.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: