lib/knj/http2.rb in knjrbfw-0.0.51 vs lib/knj/http2.rb in knjrbfw-0.0.52

- old
+ new

@@ -385,10 +385,14 @@ first = true @cookies.each do |cookie_name, cookie_data| cstr << "; " if !first first = false if first - cstr << "#{Knj::Web.urlenc(cookie_data["name"])}=#{Knj::Web.urlenc(cookie_data["value"])}" + if cookie_data.is_a?(Hash) + cstr << "#{Knj::Web.urlenc(cookie_data["name"])}=#{Knj::Web.urlenc(cookie_data["value"])}" + else + cstr << "#{Knj::Web.urlenc(cookie_name)}=#{Knj::Web.urlenc(cookie_data)}" + end end headers_hash["Cookie"] = cstr end \ No newline at end of file