Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/CommandToRequestTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,20 +240,20 @@ public function cosDomain2CiTransformer(CommandInterface $command, $request) {
$action = $command->getName();
if(key_exists($action, array(
'DescribeMediaBuckets' => 1,
'DescribeDocProcessBuckets' =>1,
'GetPicBucketList' =>1,
'GetAiBucketList' =>1,
'DescribeDocProcessBuckets' => 1,
'GetPicBucketList' => 1,
'GetAiBucketList' => 1,
))) {
$origin_host = "ci.{$this->config['region']}.myqcloud.com";
$host = $origin_host;
if ($this->config['ip'] != null) {
$host = $this->config['ip'];
if ($this->config['port'] != null) {
$host = $this->config['ip'] . ":" . $this->config['port'];
$host = $this->config['ip'] . ':' . $this->config['port'];
}
}

$path = $this->config['schema'].'://'. $host . $request->getUri()->getPath();
$path = 'https://'. $host . $request->getUri()->getPath();
$uri = new Uri( $path );
$query = $request->getUri()->getQuery();
$uri = $uri->withQuery( $query );
Expand Down Expand Up @@ -373,7 +373,7 @@ public function cosDomain2CiTransformer(CommandInterface $command, $request) {
);
if (key_exists($action, $ciActions)) {
// 万象接口需要https,http方式报错
if($this->config['schema'] !== 'https') {
if ($this->config['schema'] !== 'https') {
$e = new Exception\CosException('CI request schema must be "https", instead of "http"');
$e->setExceptionCode('Invalid Argument');
throw $e;
Expand Down