mirror of
https://github.com/samsonjs/http-cookie.git
synced 2026-03-25 08:55:53 +00:00
Do not touch and yield a cookie that should not be sent.
This commit is contained in:
parent
30920cae9c
commit
51da5e4c50
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue