Skip to content

Commit caf4b31

Browse files
nic12347franktguo
andauthored
CI-修复schema本地报错 (#319)
Co-authored-by: franktguo <[email protected]>
1 parent c86c4ae commit caf4b31

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/CommandToRequestTransformer.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,13 @@ public function cosDomain2CiTransformer(CommandInterface $command, $request) {
253253
}
254254
}
255255

256-
$path = 'https://'. $host . $request->getUri()->getPath();
256+
// 万象接口需要https,http方式报错
257+
if ($this->config['schema'] !== 'https') {
258+
$e = new Exception\CosException('CI request schema must be "https", instead of "http"');
259+
$e->setExceptionCode('Invalid Argument');
260+
throw $e;
261+
}
262+
$path = $this->config['schema'].'://'. $host . $request->getUri()->getPath();
257263
$uri = new Uri( $path );
258264
$query = $request->getUri()->getQuery();
259265
$uri = $uri->withQuery( $query );

0 commit comments

Comments
 (0)