-
Notifications
You must be signed in to change notification settings - Fork 807
cmkid,crc64,sign-v2 #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmkid,crc64,sign-v2 #160
Conversation
|
彧贤 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
| if (request.getExpiration() == null) { | ||
| throw new IllegalArgumentException(OSS_RESOURCE_MANAGER.getString("MustSetExpiration")); | ||
| } | ||
| String url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 建议在声明的地方初始化。
| /** | ||
| * Gets the user agent string. | ||
| * | ||
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ClientConfiguration.java中包括其它地方,代码格式化作为单独的提交,不要和功能修改混在一起;
| * bucket name and object key, and some constraint information can be set. | ||
| * @return The {@link ObjectMetadata} instance. | ||
| */ | ||
| public ObjectMetadata headObject(HeadObjectRequest headObjectRequest) throws OSSException, ClientException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 为什么要加headobject,感觉没有必要
| * @throws ClientException | ||
| * OSS Client side exception. | ||
| */ | ||
| public OSSObject getVodPlaylist(String bucketName, String liveChannelName, long startTime, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- OSSObject getVodPlaylist中long startTime long endTime为什么不是Date
| return sb.toString(); | ||
| } | ||
|
|
||
| private static TreeSet<String> buildSortedAdditionalHeaderNames(Set<String> headerNames, Set<String> additionalHeaderNames) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- buildSortedAdditionalHeaderNames 的返回值 Set<String> 即可。
| * @param signatureVersion | ||
| * the signature version to switch to。 | ||
| */ | ||
| public void switchSignatureVersion(String signatureVersion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- switchSignatureVersion的参数枚举类型为最好,防止用户填错。
| public class SignTest { | ||
|
|
||
| @Test | ||
| public void testSignV2() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- V2的测试强度不够,每个API都需要在V2下跑一次。
| } | ||
|
|
||
| @Test | ||
| public void testGenerateSignedV2URL() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 这个测试不足,用户指定headers,paramters的情况,callback的情况,以及getObject(URL signedUrl, Map<String, String> requestHeaders)/PutObjectResult putObject(URL signedUrl, String filePath, Map<String, String> requestHeaders)的应用等等。
support user-assigned cmk id header & get vod playlist & sign-v2 & head object api & download\upload crc64