diff --git a/lib/restclient/request.rb b/lib/restclient/request.rb index 766831b..6841d2e 100644 --- a/lib/restclient/request.rb +++ b/lib/restclient/request.rb @@ -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