nahi/httpclient — pull request #154 by shugo (2013-04-11 07:23:54+00:00)
Title: A new cookie never be accepted if an HTTPClient has the same expired cookie.

It seems that a new cookie never be accepted if an HTTPClient has the same expired cookie.

For example, if a cookie is configured to be expired within 5 seconds, the following
code prints received cookies in the first loop, but prints empty arrays in the second loop.

hc = HTTPClient.new
2.times do
hc.get("http://localhost/books")
p hc.cookies
hc.post("http://localhost/books",
'{"title":"hello","body":"world"}',
"Content-Type"=>"application/json; charset=utf-8")
p hc.cookies
sleep 5
end

It's OK that the old cookie is expired, but the new cookie should be accepted, shouldn't it?