lib/upyun/rest.rb in upyun-1.0.7 vs lib/upyun/rest.rb in upyun-1.0.8
- old
+ new
@@ -96,9 +96,12 @@
private
def fullpath(path)
decoded = URI::encode(URI::decode(path.to_s.force_encoding('utf-8')))
+
+ # URI::encode did not encode '[]'
+ decoded = decoded.gsub('[', '%5B').gsub(']', '%5D')
"/#{@bucket}#{decoded.start_with?('/') ? decoded : '/' + decoded}"
end
def request(method, path, options={}, &block)
fullpath = fullpath(path)