aliyun-beta / aliyun-oss-ruby-sdk

Ruby SDK for Aliyun Open Simple Storage
Apache License 2.0
17 stars 3 forks source link

Fix signature for private bucket #7

Closed huacnlee closed 8 years ago

huacnlee commented 8 years ago

阿里云官方文档给出的例子来看,签名字符串是需要 Escape 的:

http://oss-example.oss-cn-hangzhou.aliyuncs.com/oss-api.pdf?OSSAccessKeyId=44CF9590006BF252F707&Expires=1141889120&Signature=vjbyPxybdZaNmGa%2ByT272YEAiv4%3D
Signature=vjbyPxybdZaNmGa%2ByT272YEAiv4%3D

而之前用的 URI.escape 是不行的,它不会把 = 之类的符号进行转义。

huacnlee commented 8 years ago

此外 URI.escape, URI.unescape 两个方法已经过时了: https://github.com/ruby/ruby/commit/238b979f1789f95262a267d8df6239806f2859cc

zlx commented 8 years ago

文档很多时候并不可靠,你试过修改后能够成功通过下载链接下载文件吗?

zlx commented 8 years ago

我查看了 官方的 python 库,的确如你所说。 修复一下 CI, 我来合并吧

huacnlee commented 8 years ago

我当然是已经验证确认过了 Newell Zhu notifications@github.com于2016年3月4日 周五10:36写道:

我查看了 官方的 python 库,的确如你所说。 修复一下 CI, 我来合并吧

— Reply to this email directly or view it on GitHub https://github.com/aliyun-beta/aliyun-oss-ruby-sdk/pull/7#issuecomment-192068456 .

zlx commented 8 years ago

Merged & Published 0.1.6