mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
fix on val.to_s CGI::unescape only accepts strings, sometimes a value needs to be to_s like on the params collect above.
This commit is contained in:
parent
6a4ac722a1
commit
b1e7233bde
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ module RestClient
|
|||
|
||||
def make_headers user_headers
|
||||
unless @cookies.empty?
|
||||
user_headers[:cookie] = @cookies.map { |(key, val)| "#{key.to_s}=#{CGI::unescape(val)}" }.sort.join('; ')
|
||||
user_headers[:cookie] = @cookies.map { |(key, val)| "#{key.to_s}=#{CGI::unescape(val.to_s)}" }.sort.join('; ')
|
||||
end
|
||||
headers = stringify_headers(default_headers).merge(stringify_headers(user_headers))
|
||||
headers.merge!(@payload.headers) if @payload
|
||||
|
|
Loading…
Reference in a new issue