Skip to content
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

list objects接口的签名计算方法与官网文档不一致 #33

Open
neepher opened this issue Jun 18, 2024 · 1 comment
Open

list objects接口的签名计算方法与官网文档不一致 #33

neepher opened this issue Jun 18, 2024 · 1 comment

Comments

@neepher
Copy link

neepher commented Jun 18, 2024

使用该 SDK 调用 listObjects 接口, 使用路径模式,计算的 canonical resource 与官网文档中的构造过程不一致。

  obsClient = ObsClient(access_key_id=access_key, secret_access_key=secret_key, server=api, client_mode='workflow')
  resp = obsClient.listObjects(bucket)                                            
  print(resp)  

打印出来的签名字符串如下:

GET


Tue, 18 Jun 2024 10:19:23 GMT
/private-bucket

官网文档中的描述:

不是通过桶绑定的自定义域名访问OBS的场景,则为"/bucket/object",如果没有对象名,如列举桶,则为"/bucket/"。如果桶名也没有,则为“/”。
https://support.huaweicloud.com/intl/zh-cn/api-obs/obs_04_0010.html

上述为 sdk 的bug , 还是官网文档写的有问题呢?

@liqiuqiu111
Copy link

SDK基于api开发,但是并不是完全一样,列举对象的api应参考此文档https://support.huaweicloud.com/intl/zh-cn/api-obs/obs_04_0022.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants