Do not touch and yield a cookie that should not be sent.

This commit is contained in:
Akinori MUSHA 2013-03-26 01:43:06 +09:00
parent 30920cae9c
commit 51da5e4c50

View file

@ -63,8 +63,10 @@ class HTTP::CookieJar
if cookie.expired?
true
else
cookie.accessed_at = Time.now
yield cookie
if cookie.valid_for_uri?(uri)
cookie.accessed_at = Time.now
yield cookie
end
false
end
}