lib/google/cloud/storage/file/signer_v4.rb in google-cloud-storage-1.28.0 vs lib/google/cloud/storage/file/signer_v4.rb in google-cloud-storage-1.29.0
- old
+ new
@@ -271,10 +271,10 @@
##
# Only the characters in the regex set [A-Za-z0-9.~_-] must be left un-escaped; all others must be
# percent-encoded using %XX UTF-8 style.
def escape_query_param str
- CGI.escape(str.to_s).gsub("%7E", "~")
+ CGI.escape(str.to_s).gsub("%7E", "~").gsub("+", "%20")
end
def host_name virtual_hosted_style, bucket_bound_hostname
return bucket_bound_hostname if bucket_bound_hostname
virtual_hosted_style ? "#{@bucket_name}.storage.googleapis.com" : "storage.googleapis.com"