File tree Expand file tree Collapse file tree 5 files changed +8
-55
lines changed Expand file tree Collapse file tree 5 files changed +8
-55
lines changed Original file line number Diff line number Diff line change 248248 'Qcloud\Cos\Exception\ServiceResponseException ' => 'src/Qcloud/Cos/Exception/ServiceResponseException.php ' ,
249249 'Qcloud\Cos\ExceptionListener ' => 'src/Qcloud/Cos/ExceptionListener.php ' ,
250250 'Qcloud\Cos\ExceptionParser ' => 'src/Qcloud/Cos/ExceptionParser.php ' ,
251- 'Qcloud\Cos\GetServiceListener ' => 'src/Qcloud/Cos/GetServiceListener.php ' ,
252251 'Qcloud\Cos\MultipartUpload ' => 'src/Qcloud/Cos/MultipartUpload.php ' ,
253252 'Qcloud\Cos\Service ' => 'src/Qcloud/Cos/Service.php ' ,
254253 'Qcloud\Cos\Signature ' => 'src/Qcloud/Cos/Signature.php ' ,
278277 if (isset ($ mapping [$ class ])) {
279278 require $ mapping [$ class ];
280279 }
281- }, true );
280+ }, true );
Original file line number Diff line number Diff line change @@ -28,7 +28,11 @@ public function onCommandAfterPrepare(Event $event) {
2828 $ command = $ event ['command ' ];
2929 $ bucket = $ command ['Bucket ' ];
3030 $ request = $ command ->getRequest ();
31-
31+ if ($ command ->getName () == 'ListBuckets ' )
32+ {
33+ $ request ->setHost ('service.cos.myqcloud.com ' );
34+ return ;
35+ }
3236 if ($ key = $ command ['Key ' ]) {
3337 // Modify the command Key to account for the {/Key*} explosion into an array
3438 if (is_array ($ key )) {
Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ public function __construct($config) {
5252$ this ->setUserAgent ('cos-php-sdk-v5/ ' . Client::VERSION , true );
5353
5454$ this ->addSubscriber (new ExceptionListener ());
55- $ this ->addSubscriber (new GetServiceListener ());
5655$ this ->addSubscriber (new TokenListener ($ this ->token ));
5756$ this ->addSubscriber (new SignatureListener ($ this ->secretId , $ this ->secretKey ));
5857$ this ->addSubscriber (new BucketStyleListener ($ this ->appId ));
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public static function getService() {
1313 'operations ' => array (
1414 'ListBuckets ' => array (
1515 'httpMethod ' => 'GET ' ,
16- 'uri ' => '/ASDWQdsawqefdQWESDFFSDFSADCXSVSDQWERTREGERTYTHDF ' ,
16+ 'uri ' => '/ ' ,
1717 'class ' => 'Qcloud \\Cos \\Command ' ,
1818 'responseClass ' => 'ListBucketsOutput ' ,
1919 'responseType ' => 'model ' ,
@@ -517,7 +517,7 @@ public static function getService() {
517517 'RequestPayer ' => array (
518518 'type ' => 'string ' ,
519519 'location ' => 'header ' ,
520- 'sentAs ' => 'x-amz -request-payer ' ,
520+ 'sentAs ' => 'x-cos -request-payer ' ,
521521 ),
522522 'command.expects ' => array (
523523 'static ' => true ,
You can’t perform that action at this time.
0 commit comments