Fixed parameters encoding (should be urlencoded)
This commit is contained in:
parent
17e540d0de
commit
2eb6da99d3
|
@ -172,12 +172,14 @@ module Google
|
|||
query_parameters = parameters.reject do |k, v|
|
||||
template_variables.include?(k)
|
||||
end
|
||||
if query_parameters.size > 0
|
||||
uri.query_values = (uri.query_values || []) + query_parameters
|
||||
# encode all non-template parameters
|
||||
params = ""
|
||||
unless query_parameters.empty?
|
||||
params = "?" + Addressable::URI.form_encode(query_parameters)
|
||||
end
|
||||
# Normalization is necessary because of undesirable percent-escaping
|
||||
# during URI template expansion
|
||||
return uri.normalize
|
||||
return uri.normalize + params
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in New Issue