From 7ef345593b3e1190f4b218be596d960c8fa48897 Mon Sep 17 00:00:00 2001 From: lewzylu Date: Mon, 7 Oct 2019 21:04:51 +0800 Subject: [PATCH 1/3] update Test --- src/Qcloud/Cos/Tests/Test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Qcloud/Cos/Tests/Test.php b/src/Qcloud/Cos/Tests/Test.php index 7d4d1369..53d14adb 100644 --- a/src/Qcloud/Cos/Tests/Test.php +++ b/src/Qcloud/Cos/Tests/Test.php @@ -1016,7 +1016,7 @@ public function testUploadComplexObject() { public function testUploadLargeObject() { try { $key = '你好.txt'; - $body = $this->generateRandomString(3*1024*1024+1023); + $body = $this->generateRandomString(2*1024*1024+1023); $md5 = base64_encode(md5($body, true)); $this->cosClient->upload($bucket=$this->bucket, $key=$key, @@ -1210,7 +1210,7 @@ public function testCopyLargeObject() { try{ $src_key = '你好.txt'; $dst_key = 'hi.txt'; - $body = $this->generateRandomString(3*1024*1024+333); + $body = $this->generateRandomString(2*1024*1024+333); $md5 = base64_encode(md5($body, true)); $this->cosClient->upload($bucket=$this->bucket, $key=$src_key, From e198fd040c551034ba19e1dbda2f8306af95f65f Mon Sep 17 00:00:00 2001 From: lewzylu Date: Tue, 29 Oct 2019 20:50:47 +0800 Subject: [PATCH 2/3] patch putObject with fopen --- src/Qcloud/Cos/Tests/.TestHelper.php.swp | Bin 12288 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/Qcloud/Cos/Tests/.TestHelper.php.swp diff --git a/src/Qcloud/Cos/Tests/.TestHelper.php.swp b/src/Qcloud/Cos/Tests/.TestHelper.php.swp deleted file mode 100644 index d879258ec7609cb61f59791cdf39f16049dfe6bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2O>Y}T7{{kj@zPRS!5vM5rCm#L)@ho8n!2SJ3#^hRv`Hk?MAmvePL^zUS2MHC z3yOL}a704lTOh%AfEyAVIdI~D#5V{M75~}w#`fA9%8jCDq`$}WKF{xYW~?aFt#7oK z`CD^W8PX-jj*hQybzbD`?pelU6lqiaPibShGrxGPb7f(% zfkgLfZ(m>wSLW-c&zm!s`RlK(mv*NHB0vO)01+SpM1Tko0U|&I{(l5?e1<)SSN(|Nj5; zB4fwUuh0+B_t1CHx6o(MJ~Rvc^(xw+FQ7K`_2=nd!+^gQ&(D~x>uJ%-ky z1?b6n#(sl-hQ5Z5pa%2;^y4|kK8L!{Rp=sgjD7wN{Q`XnMbHNH4s;EwLvv7S&ok%` z+A_vehqt%GND5|3c@o}E#AhmEGn`psdF2uJTv0gd zy>>6NGf7JihP7Kon@0!d->p01V0^r(*qUW|hiQ2!;Ze!Ja`q+U(}?Z>XvnJxCz zWwksgM1k2RAJ8Zqk`H}VWUaZsLYMku{Y0cCyo^*aQ8^+@j0G63G>gn&B9H7Z9B|Ir~e)6_)eT9!~tGRN&bHCNR*IGjyltseGcysWP zaL0|#aHsXLRV_bfP@xAcDlQCanC From 602c523d9ddee1ffcb8b6b50da0262096df6ffdf Mon Sep 17 00:00:00 2001 From: lewzylu Date: Tue, 29 Oct 2019 21:34:42 +0800 Subject: [PATCH 3/3] update --- src/Qcloud/Cos/Client.php | 6 +- src/Qcloud/Cos/CosTransformer.php | 23 +- src/Qcloud/Cos/Service.php | 600 ++++++++++++++++++++++++++---- src/Qcloud/Cos/Tests/Test.php | 51 +++ 4 files changed, 606 insertions(+), 74 deletions(-) diff --git a/src/Qcloud/Cos/Client.php b/src/Qcloud/Cos/Client.php index 7c32fa02..2bdbc471 100644 --- a/src/Qcloud/Cos/Client.php +++ b/src/Qcloud/Cos/Client.php @@ -22,7 +22,7 @@ class Client extends GuzzleClient { - const VERSION = '2.0.0'; + const VERSION = '2.0.1'; private $httpCilent; private $api; @@ -67,8 +67,9 @@ public function __construct($cosConfig) { $this->signature = new Signature($this->cosConfig['secretId'], $this->cosConfig['secretKey']); $this->httpClient = new HttpClient([ 'base_uri' => $this->cosConfig['schema'].'://cos.' . $this->cosConfig['region'] . '.myqcloud.com/', + 'timeout' => $this->cosConfig['timeout'], 'handler' => $handler, - 'proxy' => $this->cosConfig['proxy'] + 'proxy' => $this->cosConfig['proxy'], ]); $this->desc = new Description($service); $this->api = (array)($this->desc->getOperations()); @@ -87,6 +88,7 @@ public function commandToRequestTransformer(CommandInterface $command) $request = $transformer->bucketStyleTransformer($command, $request); $request = $transformer->uploadBodyTransformer($command, $request); $request = $transformer->md5Transformer($command, $request); + $request = $transformer->specialParamTransformer($command, $request); return $request; } diff --git a/src/Qcloud/Cos/CosTransformer.php b/src/Qcloud/Cos/CosTransformer.php index 9f143f27..c4994a55 100644 --- a/src/Qcloud/Cos/CosTransformer.php +++ b/src/Qcloud/Cos/CosTransformer.php @@ -66,7 +66,11 @@ public function bucketStyleTransformer(CommandInterface $command, RequestInterfa } $path = $this->config['schema'].'://'. $host . $uri; $uri = new Uri($path); - $uri = $uri->withQuery($request->getUri()->getQuery()); + $query = $request->getUri()->getQuery(); + if ($uri->getQuery() != $query && $uri->getQuery() != "") { + $query = $uri->getQuery() . "&" . $request->getUri()->getQuery(); + } + $uri = $uri->withQuery($query); return $request->withUri($uri); } @@ -84,8 +88,8 @@ public function uploadBodyTransformer(CommandInterface $command, $request, $body $body = fopen($source, 'rb'); } // Prepare the body parameter and remove the source file parameter - if (null !== $body) { - return $request->withBody(Psr7\stream_for($body)); + if (null !== $body) { + return $request; } else { throw new Exception\InvalidArgumentException( "You must specify a non-null value for the {$bodyParameter} or {$sourceParameter} parameters."); @@ -119,6 +123,19 @@ private function addMd5($request) { return $request; } + // count md5 + public function specialParamTransformer(CommandInterface $command, $request) { + $action = $command->getName(); + if ($action == 'PutBucketInventory') { + $id = $command['Id']; + $uri = $request->getUri(); + $query = $uri->getQuery(); + $uri = $uri->withQuery($query . "&Id=".$id); + return $request->withUri($uri); + } + return $request; + } + public function __destruct() { } diff --git a/src/Qcloud/Cos/Service.php b/src/Qcloud/Cos/Service.php index c5ecd633..a281501d 100644 --- a/src/Qcloud/Cos/Service.php +++ b/src/Qcloud/Cos/Service.php @@ -465,6 +465,42 @@ public static function getService() { ), ), ), + // 删除存储桶标签信息的方法 + 'DeleteBucketTagging' => array( + 'httpMethod' => 'DELETE', + 'uri' => '/{Bucket}?tagging', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'DeleteBucketTaggingOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Bucket' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'uri', + ), + ), + ), + // 删除存储桶标清单任务的方法 + 'DeleteBucketInventory' => array( + 'httpMethod' => 'Delete', + 'uri' => '/{Bucket}?inventory', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'DeleteBucketInventoryOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Bucket' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'uri', + ), + 'Id' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'query', + 'sentAs' => 'id', + ) + ), + ), // 删除 COS 上单个对象的方法. 'DeleteObject' => array( 'httpMethod' => 'DELETE', @@ -887,6 +923,57 @@ public static function getService() { ) ), ), + // 获取存储桶(Bucket) 日志信息的方法. + 'GetBucketLogging' => array( + 'httpMethod' => 'GET', + 'uri' => '/{Bucket}?logging', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'GetBucketLoggingOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Bucket' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'uri', + ) + ), + ), + // 获取存储桶(Bucket) 清单信息的方法. + 'GetBucketInventory' => array( + 'httpMethod' => 'GET', + 'uri' => '/{Bucket}?inventory', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'GetBucketInventoryOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Bucket' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'uri', + ), + 'Id' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'query', + 'sentAs' => 'id', + ) + ), + ), + // 获取存储桶(Bucket) 标签信息的方法. + 'GetBucketTagging' => array( + 'httpMethod' => 'GET', + 'uri' => '/{Bucket}?tagging', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'GetBucketTaggingOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Bucket' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'uri', + ) + ), + ), // 分块上传的方法. 'UploadPart' => array( 'httpMethod' => 'PUT', @@ -1867,6 +1954,181 @@ public static function getService() { ), ), ), + // 配置存储桶(Bucket) 标签的方法. + 'PutBucketTagging' => array( + 'httpMethod' => 'PUT', + 'uri' => '/{Bucket}?tagging', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'PutBucketTaggingOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Tagging', + ), + 'contentMd5' => true, + ), + 'parameters' => array( + 'Bucket' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'uri', + ), + 'TagSet' => array( + 'required' => true, + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'name' => 'TagRule', + 'type' => 'object', + 'sentAs' => 'Tag', + 'properties' => array( + 'Key' => array( + 'required' => true, + 'type' => 'string', + ), + 'Value' => array( + 'required' => true, + 'type' => 'string', + ), + ), + ), + ), + ), + ), + //开启存储桶(Bucket) 日志服务的方法. + 'PutBucketLogging' => array( + 'httpMethod' => 'PUT', + 'uri' => '/{Bucket}?logging', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'PutBucketLoggingOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'BucketLoggingStatus', + ), + 'contentMd5' => true, + ), + 'parameters' => array( + 'Bucket' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'uri', + ), + 'LoggingEnabled' => array( + 'location' => 'xml', + 'type' => 'object', + 'properties' => array( + 'TargetBucket' => array( + 'type' => 'string', + 'location' => 'xml', + ), + 'TargetPrefix' => array( + 'type' => 'string', + 'location' => 'xml', + ), + ) + ), + ), + ), + // 配置存储桶(Bucket) 清单的方法. + 'PutBucketInventory' => array( + 'httpMethod' => 'PUT', + 'uri' => '/{Bucket}?inventory', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'PutBucketInventoryOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'InventoryConfiguration', + ), + 'contentMd5' => true, + ), + 'parameters' => array( + 'Bucket' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'uri', + ), + 'Id' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'xml', + ), + 'IsEnabled' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'xml', + ), + 'Destination' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'COSBucketDestination'=> array( + 'type' => 'object', + 'properties' => array( + 'Format' => array( + 'type' => 'string', + 'require' => true, + ), + 'AccountId' => array( + 'type' => 'string', + 'require' => true, + ), + 'Bucket' => array( + 'type' => 'string', + 'require' => true, + ), + 'Prefix' => array( + 'type' => 'string', + ), + 'Encryption' => array( + 'type' => 'object', + 'properties' => array( + 'SSE-COS' => array( + 'type' => 'string', + ), + ), + ), + ), + ), + ), + ), + 'Schedule' => array( + 'required' => true, + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Frequency' => array( + 'type' => 'string', + 'require' => true, + ), + ) + ), + 'Filter' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Prefix' => array( + 'type' => 'string', + ), + ) + ), + 'IncludedObjectVersions' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'xml', + ), + 'OptionalFields' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'name' => 'Fields', + 'type' => 'string', + 'sentAs' => 'Field', + ), + ), + ), + ), // 回热归档对象的方法. 'RestoreObject' => array( 'httpMethod' => 'POST', @@ -2099,6 +2361,26 @@ public static function getService() { ) ), ), + // 获取清单列表的方法. + 'ListBucketInventoryConfigurations' => array( + 'httpMethod' => 'GET', + 'uri' => '/{Bucket}?inventory', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'ListBucketInventoryConfigurationsOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Bucket' => array( + 'required' => true, + 'type' => 'string', + 'location' => 'uri' + ), + 'ContinuationToken' => array( + 'type' => 'string', + 'location' => 'query', + 'sentAs' => 'continuation-token', + ), + ), + ), // 获取对象的meta信息的方法 'HeadObject' => array( 'httpMethod' => 'HEAD', @@ -2505,6 +2787,26 @@ public static function getService() { ), ), ), + 'DeleteBucketTaggingOutput' => array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + ), + ), + 'DeleteBucketInventoryOutput' => array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + ), + ), 'DeleteObjectOutput' => array( 'type' => 'object', 'additionalProperties' => true, @@ -3218,6 +3520,205 @@ public static function getService() { ), ), ), + 'GetBucketInventoryOutput' => array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'Destination' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'COSBucketDestination' => array( + 'type' => 'object', + 'properties' => array( + 'Format' => array( + 'type' => 'string', + ), + 'AccountId' => array( + 'type' => 'string', + ), + 'Bucket' => array( + 'type' => 'string', + ), + 'Prefix' => array( + 'type' => 'string', + ), + 'Encryption' => array( + 'type' => 'object', + 'properties' => array( + 'SSE-COS' => array( + 'type' => 'string', + ) + ) + ), + + ), + ), + ), + ), + 'Schedule' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Frequency' => array( + 'type' => 'string', + ), + ), + ), + 'OptionalFields' => array( + 'type' => 'array', + 'location' => 'xml', + 'properties' => array( + 'Key' => array( + 'type' => 'string', + ), + ), + ), + 'OptionalFields' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'name' => 'Field', + 'type' => 'string', + 'sentAs' => 'Field', + ), + ), + 'IsEnabled' => array( + 'type' => 'string', + 'location' => 'xml', + ), + 'Id' => array( + 'type' => 'string', + 'location' => 'xml', + ), + 'IncludedObjectVersions' => array( + 'type' => 'string', + 'location' => 'xml', + ), + 'RequestId' => array( + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + ), + ), + 'GetBucketTaggingOutput' => array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'TagSet' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'sentAs' => 'Tag', + 'type' => 'object', + 'properties' => array( + 'Key' => array( + 'type' => 'string', + ), + 'Value' => array( + 'type' => 'string', + ), + ), + ), + ), + 'RequestId' => array( + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + ), + ), + 'GetBucketNotificationOutput' => array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'CloudFunctionConfigurations' => array( + 'type' => 'array', + 'location' => 'xml', + 'sentAs' => 'CloudFunctionConfiguration', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'properties' => array( + 'Id' => array( + 'type' => 'string', + ), + 'CloudFunction' => array( + 'type' => 'string', + 'sentAs' => 'CloudFunction', + ), + 'Events' => array( + 'type' => 'array', + 'sentAs' => 'Event', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'string', + ), + ), + 'Filter' => array( + 'type' => 'object', + 'properties' => array( + 'Key' => array( + 'type' => 'object', + 'sentAs' => 'Key', + 'properties' => array( + 'FilterRules' => array( + 'type' => 'array', + 'sentAs' => 'FilterRule', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'properties' => array( + 'Name' => array( + 'type' => 'string', + ), + 'Value' => array( + 'type' => 'string', + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + 'RequestId' => array( + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + ), + ), + 'GetBucketLoggingOutput' => array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'LoggingEnabled' => array( + 'location' => 'xml', + 'type' => 'object', + 'properties' => array( + 'TargetBucket' => array( + 'type' => 'string', + 'location' => 'xml', + ), + 'TargetPrefix' => array( + 'type' => 'string', + ), + ), + ), + 'RequestId' => array( + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + ), + ), 'UploadPartOutput' => array( 'type' => 'object', 'additionalProperties' => true, @@ -3449,6 +3950,36 @@ public static function getService() { ), ), ), + 'PutBucketLoggingOutput' => array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + ), + ), + 'PutBucketInventoryOutput' => array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + ), + ), + 'PutBucketTaggingOutput' => array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + ), + ), 'RestoreObjectOutput' => array( 'type' => 'object', 'additionalProperties' => true, @@ -4086,75 +4617,6 @@ public static function getService() { ), ), ), - 'GetBucketNotificationOutput' => array( - 'type' => 'object', - 'additionalProperties' => true, - 'properties' => array( - 'CloudFunctionConfigurations' => array( - 'type' => 'array', - 'location' => 'xml', - 'sentAs' => 'CloudFunctionConfiguration', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'type' => 'object', - 'properties' => array( - 'Id' => array( - 'type' => 'string', - ), - 'CloudFunction' => array( - 'type' => 'string', - 'sentAs' => 'CloudFunction', - ), - 'Events' => array( - 'type' => 'array', - 'sentAs' => 'Event', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'type' => 'string', - ), - ), - 'Filter' => array( - 'type' => 'object', - 'properties' => array( - 'Key' => array( - 'type' => 'object', - 'sentAs' => 'Key', - 'properties' => array( - 'FilterRules' => array( - 'type' => 'array', - 'sentAs' => 'FilterRule', - 'data' => array( - 'xmlFlattened' => true, - ), - 'items' => array( - 'type' => 'object', - 'properties' => array( - 'Name' => array( - 'type' => 'string', - ), - 'Value' => array( - 'type' => 'string', - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - ), - 'RequestId' => array( - 'location' => 'header', - 'sentAs' => 'x-cos-request-id', - ), - ), - ) ) ); } diff --git a/src/Qcloud/Cos/Tests/Test.php b/src/Qcloud/Cos/Tests/Test.php index 53d14adb..19c9f645 100644 --- a/src/Qcloud/Cos/Tests/Test.php +++ b/src/Qcloud/Cos/Tests/Test.php @@ -867,6 +867,57 @@ public function testGetBucketLocationNonExisted() * TestObject **********************************/ + /* + * put object, 从本地上传文件 + * 200 + */ + public function testPutObjectLocalObject() { + try { + $key = '你好.txt'; + $body = $this->generateRandomString(1024+1023); + $md5 = base64_encode(md5($body, true)); + $local_test_key = "local_test_file"; + $f = fopen($local_test_key, "wb"); + fwrite($f, $body); + fclose($f); + $this->cosClient->putObject(['Bucket' => $this->bucket, + 'Key' => $key, + 'Body' => fopen($local_test_key, "rb")]); + $rt = $this->cosClient->getObject(['Bucket'=>$this->bucket, 'Key'=>$key]); + $download_md5 = base64_encode(md5($rt['Body'], true)); + $this->assertEquals($md5, $download_md5); + } catch (ServiceResponseException $e) { + print $e; + $this->assertFalse(TRUE); + } + } + + /* + * upload, 从本地上传 + * 200 + */ + public function testUploadLocalObject() { + try { + $key = '你好.txt'; + $body = $this->generateRandomString(1024+1023); + $md5 = base64_encode(md5($body, true)); + $local_test_key = "local_test_file"; + $f = fopen($local_test_key, "wb"); + fwrite($f, $body); + fclose($f); + $this->cosClient->upload($bucket=$this->bucket, + $key=$key, + $body=fopen($local_test_key, "rb"), + $options=['PartSize'=>1024 * 1024 + 1]); + $rt = $this->cosClient->getObject(['Bucket'=>$this->bucket, 'Key'=>$key]); + $download_md5 = base64_encode(md5($rt['Body'], true)); + $this->assertEquals($md5, $download_md5); + } catch (ServiceResponseException $e) { + print $e; + $this->assertFalse(TRUE); + } + } + /* * put object,请求头部携带服务端加密参数 * 200