--- tests/Zend/Service/Amazon/S3/OnlineTest.php (revision 22463) +++ tests/Zend/Service/Amazon/S3/OnlineTest.php (working copy) @@ -423,6 +423,23 @@ } /** + * Test that isObjectAvailable() works if object name contains spaces + * + * @depends testCreateBucket + * @depends testObjectPath + * + * ZF-10017 + */ + public function testIsObjectAvailableWithSpacesInKey() + { + $this->_amazon->createBucket($this->_bucket); + $filedir = dirname(__FILE__)."/_files/"; + $key = $this->_bucket.'/subdir/another dir with spaces/zftestfile.html'; + $this->_amazon->putFile($filedir."testdata.html", $key); + $this->assertTrue($this->_amazon->isObjectAvailable($key)); + } + + /** * Test creating object with https * * ZF-7029 Index: library/Zend/Service/Amazon/S3.php =================================================================== --- library/Zend/Service/Amazon/S3.php (revision 22463) +++ library/Zend/Service/Amazon/S3.php (working copy) @@ -190,6 +190,7 @@ */ public function isObjectAvailable($object) { + $object = $this->_fixupObjectName($object); $response = $this->_makeRequest('HEAD', $object); return ($response->getStatus() == 200);