Commit graph

15 commits

Author SHA1 Message Date
Akinori MUSHA
a485e83ad9 Simply use cookie.domain instead of cookie.domain_name.hostname. 2013-04-12 01:19:49 +09:00
Akinori MUSHA
26034253b1 Elaborate on the hash storage model. 2013-03-28 19:13:02 +09:00
Akinori MUSHA
add4a367fd Include MonitorMixin in store classes and make them thread-safe. 2013-03-28 01:05:22 +09:00
Akinori MUSHA
30e2915c1e Officially add AbstractStore#delete() as an API method. 2013-03-28 01:04:45 +09:00
Akinori MUSHA
a7575ae3df Improve documentation. 2013-03-27 18:17:56 +09:00
Akinori MUSHA
6fade20c59 Make GC threshold user specifiable. 2013-03-27 16:10:05 +09:00
Akinori MUSHA
bea9b1b502 each, cleanup: Fix the base date for expiration when the method starts.
This change is to remove an assumption that the clock is monotonic.
2013-03-27 15:10:03 +09:00
Akinori MUSHA
299bb24550 add(): Stop deleting an existing cookie when storing an expired cookie.
This is a backout of what I've done previously.  Expiration check is
better done in extraction where a user can optionally specify a base
date.

Add an internal method delete() to delete an existing cookie.
2013-03-27 14:58:22 +09:00
Akinori MUSHA
51da5e4c50 Do not touch and yield a cookie that should not be sent. 2013-03-26 01:43:06 +09:00
Akinori MUSHA
5b78957e19 Conform to RFC 6265 5.1.4 in that path=/a matches /a/* but not /ab.
Remove HTTP::Cookie.normalize_path and add HTTP::Cookie.path_match?
instead for comparison.
2013-03-23 02:02:56 +09:00
Akinori MUSHA
6dda359db1 Improve rdoc. 2013-03-23 00:37:21 +09:00
Akinori MUSHA
66f37b20dd Rename expire to expire!, to reduce the risk of making a typo. 2013-03-21 15:46:45 +09:00
Akinori MUSHA
8be03978a0 Make each(uri) not fail if a non-HTTP URL is given.
Fix documents with #each.  The uri argument was not made a keyword
argument.

Guarantee that the +uri+ given to AbstractStore#each() is a URI
object.

Make HashStore#each return self as required.
2013-03-15 11:33:54 +09:00
Akinori MUSHA
8d8f01fa81 Cap the numbers of cookies per domain and cookies total, respectively.
This is implemented in HashStore#cleanup(), which is automatically
called by #add() after every 150 updates.
2013-03-15 04:20:59 +09:00
Akinori MUSHA
d004408296 Introduce an abstraction layer for the cookie store.
CookieJar#jar is removed and #store is added instead.
2013-03-15 04:20:59 +09:00