Skip to content

Commit

Permalink
update 3.23.5
Browse files Browse the repository at this point in the history
  • Loading branch information
noaccident committed Jun 2, 2023
1 parent a56a37a commit 0c84f99
Show file tree
Hide file tree
Showing 7 changed files with 242 additions and 26 deletions.
18 changes: 0 additions & 18 deletions LICENSE
Expand Up @@ -199,21 +199,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

OPEN SOURCE SOFTWARE NOTICE

This document contains open source software notice for this product. And this document is confidential information of copyright holder. Recipient shall protect it in due care and shall not disseminate it without permission.

Warranty Disclaimer

THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,BUT WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.

Copyright Notice and License Texts

Written Offer

This product contains software whose rights holders license it on the terms of the GNU General Public License, version 2 (GPLv2) or other open source software license. We will provide you with the source code of the software licensed under related license if you send us a written request by mail or email to the following addresses:
foss@huawei.com
detailing the name of the product and the firmware version for which you need the source code and indicating how we can contact you.

PLEASE NOTE THAT WE WILL ASK YOU TO PAY US FOR THE COSTS OF A DATA CARRIER AND THE POSTAL CHARGES TO SEND THE DATA CARRIER TO YOU. THIS OFFER IS VALID FOR THREE YEARS FROM THE MOMENT WE DISTRIBUTED THE PRODUCT AND VALID FOR AS LONG AS WE OFFER SPARE PARTS OR CUSTOMER SUPPORT FOR THAT PRODUCT MODEL.
21 changes: 19 additions & 2 deletions Obs/Internal/Resource/Constants.php
Expand Up @@ -18,7 +18,7 @@
namespace Obs\Internal\Resource;

class Constants {
const ALLOWED_RESOURCE_PARAMTER_NAMES = [
const ALLOWED_RESOURCE_PARAMTER_NAMES = [
'acl',
'policy',
'torrent',
Expand Down Expand Up @@ -55,7 +55,24 @@ class Constants {
'replication',
'append',
'position',
'x-oss-process'
'x-oss-process',

'CDNNotifyConfiguration',
'attname',
'customdomain',
'directcoldaccess',
'encryption',
'inventory',
'length',
'metadata',
'modify',
'name',
'rename',
'truncate',
'x-image-save-bucket',
'x-image-save-object',
'x-obs-security-token',
'x-obs-callback',
];
const ALLOWED_REQUEST_HTTP_HEADER_METADATA_NAMES = [
'content-type',
Expand Down
104 changes: 103 additions & 1 deletion Obs/Internal/Resource/OBSRequestResource.php
Expand Up @@ -2847,6 +2847,11 @@ class OBSRequestResource {
'type' => 'string',
'location' => 'dns'
],
'Callback' => [
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-obs-callback'
],
'Key' => [
'required' => true,
'type' => 'string',
Expand Down Expand Up @@ -3921,6 +3926,11 @@ class OBSRequestResource {
'type' => 'string',
'location' => 'query',
'sentAs' => 'uploadId'
],
'Callback' => [
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-obs-callback'
]
],
'responseParameters' => [
Expand Down Expand Up @@ -4181,7 +4191,99 @@ class OBSRequestResource {
]
]
]
]
],

'setBucketCustomDomain' => [
'httpMethod' => 'PUT',
'requestParameters' => [
'Bucket' => [
'required' => true,
'type' => 'string',
'location' => 'dns'
],
'DomainName' => [
'required' => true,
'type' => 'string',
'location' => 'query',
'sentAs' => 'customdomain'
]

],
'responseParameters' => [
'RequestId' => [
'location' => 'header',
'sentAs' => 'x-obs-request-id'
]
]
],

'getBucketCustomDomain' => [
'httpMethod' => 'GET',
'specialParam' => 'customdomain',
'requestParameters' => [
'Bucket' => [
'required' => true,
'type' => 'string',
'location' => 'dns'
]
],
'responseParameters' => [
'type' => 'object',
'properties' => [
'RequestId' => [
'location' => 'header',
'sentAs' => 'x-obs-request-id'
],
'Domains' => [
'type' => 'array',
'location' => 'xml',
'sentAs' => 'Domains',
'data' => [
'xmlFlattened' => true
],
'items' => [
'type' => 'object',
'properties' => [
'DomainName' => [
'type' => 'string',
'location' => 'xml',
'sentAs' => 'DomainName'
],
'CreateTime' => [
'type' => 'string',
'location' => 'xml',
'sentAs' => 'CreateTime'
],
]
]
]
]
]
],

'deleteBucketCustomDomain' => [
'httpMethod' => 'DELETE',
'requestParameters' => [
'Bucket' => [
'required' => true,
'type' => 'string',
'location' => 'dns'
],
'DomainName' => [
'required' => true,
'type' => 'string',
'location' => 'query',
'sentAs' => 'customdomain'
]
],
'responseParameters' => [
'RequestId' => [
'location' => 'header',
'sentAs' => 'x-obs-request-id'
]
]
],

],

'aliases' => [
Expand Down
103 changes: 102 additions & 1 deletion Obs/Internal/Resource/V2RequestResource.php
Expand Up @@ -2683,6 +2683,11 @@ class V2RequestResource {
'type' => 'string',
'location' => 'uri'
],
'Callback' => [
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-callback'
],
'ContentMD5' => [
'type' => 'string',
'location' => 'header',
Expand Down Expand Up @@ -3733,6 +3738,11 @@ class V2RequestResource {
'type' => 'string',
'location' => 'query',
'sentAs' => 'uploadId'
],
'Callback' => [
'type' => 'string',
'location' => 'header',
'sentAs' => 'x-amz-callback'
]
],
'responseParameters' => [
Expand Down Expand Up @@ -3999,7 +4009,98 @@ class V2RequestResource {
]
]
]
]
],

'setBucketCustomDomain' => [
'httpMethod' => 'PUT',
'requestParameters' => [
'Bucket' => [
'required' => true,
'type' => 'string',
'location' => 'dns'
],
'DomainName' => [
'required' => true,
'type' => 'string',
'location' => 'query',
'sentAs' => 'customdomain'
]

],
'responseParameters' => [
'RequestId' => [
'location' => 'header',
'sentAs' => 'x-obs-request-id'
]
]
],

'getBucketCustomDomain' => [
'httpMethod' => 'GET',
'specialParam' => 'customdomain',
'requestParameters' => [
'Bucket' => [
'required' => true,
'type' => 'string',
'location' => 'dns'
]
],
'responseParameters' => [
'type' => 'object',
'properties' => [
'RequestId' => [
'location' => 'header',
'sentAs' => 'x-obs-request-id'
],
'Domains' => [
'type' => 'array',
'location' => 'xml',
'sentAs' => 'Domains',
'data' => [
'xmlFlattened' => true
],
'items' => [
'type' => 'object',
'properties' => [
'DomainName' => [
'type' => 'string',
'location' => 'xml',
'sentAs' => 'DomainName'
],
'CreateTime' => [
'type' => 'string',
'location' => 'xml',
'sentAs' => 'CreateTime'
],
]
]
]
]
]
],

'deleteBucketCustomDomain' => [
'httpMethod' => 'DELETE',
'requestParameters' => [
'Bucket' => [
'required' => true,
'type' => 'string',
'location' => 'dns'
],
'DomainName' => [
'required' => true,
'type' => 'string',
'location' => 'query',
'sentAs' => 'customdomain'
]
],
'responseParameters' => [
'RequestId' => [
'location' => 'header',
'sentAs' => 'x-obs-request-id'
]
]
],
],

'aliases' => [
Expand Down
2 changes: 1 addition & 1 deletion Obs/ObsClient.php
Expand Up @@ -398,7 +398,7 @@ private static function choose_handler($obsclient)
} elseif (function_exists('curl_multi_exec')) {
$f = new SdkCurlFactory(50);
$obsclient->factorys[] = $f;
$handler = new CurlMultiHandler(['handle_factory' => $f1]);
$handler = new CurlMultiHandler(['handle_factory' => $f]);
}

if (ini_get('allow_url_fopen')) {
Expand Down
13 changes: 13 additions & 0 deletions README.md
@@ -1,5 +1,18 @@
Version 3.22.6

新特性:
1. 新增自定义域名相关接口;
2. 新增上传回调参数;

资料&demo:

修复问题:
1. 优化部分代码;

----

Version 3.22.6

新特性:

资料&demo:
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Expand Up @@ -2,12 +2,13 @@
"name" : "obs/esdk-obs-php",
"description" : "OBS PHP SDK",
"license":"Apache-2.0",
"version":"3.22.6",
"version":"3.23.5",
"require" : {
"php" : ">=5.6.0",
"guzzlehttp/guzzle" : "^6.3.0 || ^7.0",
"guzzlehttp/psr7" : "^1.4.2 || ^2.0",
"monolog/monolog" : "^1.23.0 || ^2.0"
"monolog/monolog" : "^1.23.0 || ^2.0",
"psr/http-message": "^1.0"
},

"keywords" :["obs", "php"],
Expand All @@ -16,4 +17,4 @@
"Obs\\": "Obs/"
}
}
}
}

0 comments on commit 0c84f99

Please sign in to comment.