Commit graph

20 commits

Author SHA1 Message Date
Akinori MUSHA
3c6659f43a Enable code coverage. 2012-11-06 01:12:29 +09:00
Akinori MUSHA
4bb4d51f8d Use a newer version of test-unit. 2012-11-06 00:05:09 +09:00
Akinori MUSHA
1731b155e6 HTTP::CookieJar#add: Check if both the domain and path of the cookie are set. 2012-10-22 14:50:49 +09:00
Akinori MUSHA
fa45e028a7 Treat an empty path as '/'.
HTTP::CookieJar#cookies: Do not modify a given URI.  Remove a
redundant cleanup() call.
2012-10-22 14:21:46 +09:00
Akinori MUSHA
a47a849387 Define HTTP::Cookie#name= with validation. 2012-10-22 03:52:25 +09:00
Akinori MUSHA
fdcdae34be Make test_save_and_read_cookiestxt better. 2012-10-22 03:29:32 +09:00
Akinori MUSHA
95c702f99b Rename HTTP::CookieJar#add! to HTTP::CookieJar#add removing the original #add. 2012-10-22 02:39:20 +09:00
Akinori MUSHA
a342680e4e Fix and move some tests from test_http_cookie_jar.rb to test_http_cookie.rb. 2012-10-22 02:38:08 +09:00
Akinori MUSHA
ae4a9d8d40 Make HTTP::Cookie Comparable. 2012-10-22 01:02:00 +09:00
Akinori MUSHA
53e5b270ee Improve test_save_cookies_yaml(). 2012-10-22 00:04:53 +09:00
Akinori MUSHA
aa64d3d98b Rename HTTP::Cookie#clear! to clear. 2012-10-21 23:48:57 +09:00
Akinori MUSHA
dd3ca9a0f1 Inhibit a domain-less cookie from being used for checking validity. 2012-10-18 19:00:33 +09:00
Akinori MUSHA
75f7ee6505 Make valid_for_uri? and acceptable_from_uri? accept a URL string also. 2012-10-18 18:57:46 +09:00
Akinori MUSHA
e010e8f30e Add tests for valid_for_uri?. 2012-10-18 18:52:06 +09:00
Akinori MUSHA
1a471513de Disallow changing the origin of a cookie once it is set. 2012-10-17 22:35:30 +09:00
Akinori MUSHA
532101a102 Introduce a new cookie object attribute "origin".
Change the signature of HTTP::Cookie.parse() so that it only
optionally takes an origin URI.  When one is given, the method checks
if each piece of cookie in the header value is valid and acceptable
from the origin to ignore unacceptable cookies.
2012-10-17 22:35:30 +09:00
Akinori MUSHA
905cd2bc26 HTTP::Cookie.parse now returns an compacted array. 2012-10-17 22:34:29 +09:00
Akinori MUSHA
0cf86222f6 Booleanize the value if the key name is suffixed with a "?".
Neglect the "!" suffix that is not suitable for an attribute name
while at it.
2012-10-17 20:26:40 +09:00
Akinori MUSHA
2b96f2317d Class name paranoia. 2012-10-14 22:10:44 +09:00
Akinori MUSHA
060fc63c2a Import cookie related stuff from Mechanize. 2012-10-14 18:52:52 +09:00