浏览代码

fixes issue ZF-7990. set endpoint before authentication.

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18599 44c647ce-9c0f-0410-b52a-842ac1e357ba
klassicd 16 年之前
父节点
当前提交
f4b9c6497e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      library/Zend/Service/Amazon/S3.php

+ 1 - 1
library/Zend/Service/Amazon/S3.php

@@ -474,6 +474,7 @@ class Zend_Service_Amazon_S3 extends Zend_Service_Amazon_Abstract
         $client = self::getHttpClient();
 
         $client->resetParameters();
+        $client->setUri($endpoint);
         $client->setAuth(false);
         // Work around buglet in HTTP client - it doesn't clean headers
         // Remove when ZHC is fixed
@@ -482,7 +483,6 @@ class Zend_Service_Amazon_S3 extends Zend_Service_Amazon_Abstract
                                   'Range'       => null,
                                   'x-amz-acl'   => null));
 
-        $client->setUri($endpoint);
         $client->setHeaders($headers);
 
         if (is_array($params)) {