Commit Graph

31 Commits (992944257cd97bbe6f544cb43e4566aec5fa10ea)

Author SHA1 Message Date
Tatsuhiro Tsujikawa aa4ea8889c clang-format-3.9 2016-10-15 19:02:54 +09:00
Tatsuhiro Tsujikawa bafbbe7c1d Allow subsecond value in ns cookie.txt file's expiry time field 2016-05-15 18:40:50 +09:00
Tatsuhiro Tsujikawa e92027b9f0 clang-format 2016-01-05 16:23:58 +09:00
Tatsuhiro Tsujikawa b1132d6b10 make clang-format using clang-format-3.6 2015-12-27 18:40:08 +09:00
Tatsuhiro Tsujikawa 9e7579b475 Set old cookie's creation-time to new cookie on replacement
As described in http://tools.ietf.org/html/rfc6265#section-5.3
2013-09-20 00:24:03 +09:00
Tatsuhiro Tsujikawa 5a223115e0 Rewrite CookieStorage 2013-06-29 23:09:09 +09:00
Tatsuhiro Tsujikawa 9041be8e32 Add tailmatch testcase for cookie 2013-04-15 21:30:15 +09:00
Tatsuhiro Tsujikawa 8b0c701266 Removed trailing spaces 2012-10-01 23:52:22 +09:00
Tatsuhiro Tsujikawa 168094560d Rewritten CookieStorage using stdio instead of stream 2011-08-05 22:44:54 +09:00
Tatsuhiro Tsujikawa 3ee6784b76 Made `make distcheck' pass.
We added 2 macros A2_TEST_DIR and A2_TEST_OUT_DIR to pass tests in
`make distcheck`.  A2_TEST_DIR refers to test directory.  All output
files by unit tests are now created under A2_TEST_OUT_DIR directory.
2010-12-02 22:52:35 +09:00
Tatsuhiro Tsujikawa 423ec26fe4 2010-10-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use std::numeric_limits<time_t> instead of checking of
	sizeof(time_t).
	* src/NsCookieParser.cc
	* src/Sqlite3CookieParser.cc
	* src/cookie_helper.cc
	* test/CookieHelperTest.cc
	* test/CookieStorageTest.cc
	* test/NsCookieParserTest.cc
2010-10-27 14:54:25 +00:00
Tatsuhiro Tsujikawa 96ee327bf3 2010-10-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error without sqlite3
	* test/CookieStorageTest.cc
2010-10-10 14:05:08 +00:00
Tatsuhiro Tsujikawa 8b17d4b276 2010-10-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten Cookie class and Cookie parser based on
	http://tools.ietf.org/html/draft-ietf-httpstate-cookie-14 with
	some modifications. When parsing cookie date, match time first so
	that it parses asctime() format. The request-path must be ends
	with '/' so that request-path '/foo/' path-matches cookie-path
	'/foo' and '/foo/' in the proposed algorithm.
	* src/Cookie.cc
	* src/Cookie.h
	* src/CookieParser.cc: Removed
	* src/CookieParser.h: Removed
	* src/CookieStorage.cc
	* src/CookieStorage.h
	* src/HttpResponse.cc
	* src/Makefile.am
	* src/Makefile.in
	* src/MultiUrlRequestInfo.cc
	* src/NsCookieParser.cc
	* src/NsCookieParser.h
	* src/Sqlite3CookieParser.cc
	* src/Sqlite3CookieParser.h
	* src/a2functional.h
	* src/cookie_helper.cc
	* src/cookie_helper.h
	* src/util.cc
	* src/util.h
	* test/CookieBoxFactoryTest.cc: Removed
	* test/CookieHelperTest.cc
	* test/CookieParserTest.cc: Removed
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
	* test/HttpRequestTest.cc
	* test/Makefile.am
	* test/Makefile.in
	* test/NsCookieParserTest.cc
	* test/Sqlite3CookieParserTest.cc
	* test/TestUtil.cc
	* test/TestUtil.h
	* test/a2functionalTest.cc
	* test/chromium_cookies.sqlite
	* test/cookies.sqlite
	* test/nscookietest.txt
2010-10-09 14:22:49 +00:00
Tatsuhiro Tsujikawa 880af94348 2010-07-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Increased DOMAIN_EVICTION_TRIGGER to 2000
	* src/CookieStorage.cc
	* test/CookieStorageTest.cc
2010-07-08 15:20:21 +00:00
Tatsuhiro Tsujikawa 769783dab4 2010-06-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Made test code not use /tmp
	* test/CookieStorageTest.cc
	* test/DirectDiskAdaptorTest.cc
	* test/FallocFileAllocationIteratorTest.cc
	* test/FileEntryTest.cc
	* test/FileTest.cc
	* test/GZipDecoderTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/RequestGroupManTest.cc
	* test/SignatureTest.cc
	* test/SingleFileAllocationIteratorTest.cc
	* test/UtilTest.cc
2010-06-22 12:28:37 +00:00
Tatsuhiro Tsujikawa c342bde962 2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use vector instead of deque for containers which is used for
	mostly read-only purpose.
2010-02-28 12:30:11 +00:00
Tatsuhiro Tsujikawa ca3c52a787 2010-02-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed test file
	* test/CookieStorageTest.cc
2010-02-15 14:01:11 +00:00
Tatsuhiro Tsujikawa 58f51205c6 2010-01-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that cookie for domain a.b.c is not sent to the host
	a.b.c if no other cookies are stored.  Fixed the bug that
	Cookie::markOriginServerOnly() is not called when cookies are
	loaded from file/sqlite3 database.
	* src/Cookie.h
	* src/CookieStorage.cc
	* src/NsCookieParser.cc
	* src/Sqlite3MozCookieParser.cc
	* test/CookieStorageTest.cc
	* test/NsCookieParserTest.cc
	* test/Sqlite3MozCookieParserTest.cc
	* test/cookies.sqlite
	* test/nscookietest.txt
2010-01-29 12:04:36 +00:00
Tatsuhiro Tsujikawa 4043b6ccae 2010-01-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Rewritten Cookie storage.
	* src/Cookie.cc
	* src/Cookie.h
	* src/CookieParser.cc
	* src/CookieStorage.cc
	* src/CookieStorage.h
	* src/a2functional.h
	* test/CookieParserTest.cc
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
	* test/HttpResponseTest.cc
	* test/TestUtil.h
	* test/a2functionalTest.cc
2010-01-28 14:01:50 +00:00
Tatsuhiro Tsujikawa 4db349c1f3 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80
	columns.
	* src
	* test
2010-01-05 16:01:46 +00:00
Tatsuhiro Tsujikawa e976b23728 2009-10-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed Util.{cc,h} as util.{cc,h}
	* src/Util.cc
	* src/Util.h
	* src/util.cc
	* src/util.h
2009-10-22 15:35:33 +00:00
Tatsuhiro Tsujikawa 1731db1c60 2009-07-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the unit test error without sqlite3
	* test/CookieStorageTest.cc
2009-07-21 15:17:15 +00:00
Tatsuhiro Tsujikawa e82f870fdc 2009-06-29 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed _uris from RequestGroup. All functions that refer to _uris
	were moved to FileEntry. Exit status code are now defined in
	DownloadResultCode.h.
	* src/AbstractCommand.cc
	* src/AdaptiveURISelector.cc
	* src/AdaptiveURISelector.h
	* src/AutoSaveCommand.cc
	* src/BtPostDownloadHandler.cc
	* src/CheckIntegrityDispatcherCommand.cc
	* src/CookieStorage.cc
	* src/DHTAutoSaveCommand.cc
	* src/DHTBucketRefreshCommand.cc
	* src/DHTEntryPointNameResolveCommand.cc
	* src/DHTInteractionCommand.cc
	* src/DHTPeerAnnounceCommand.cc
	* src/DHTTokenUpdateCommand.cc
	* src/DlAbortEx.h
	* src/DlRetryEx.h
	* src/DownloadCommand.cc
	* src/DownloadContext.h
	* src/DownloadFailureException.h
	* src/DownloadResult.h
	* src/DownloadResultCode.h
	* src/FeedbackURISelector.cc
	* src/FeedbackURISelector.h
	* src/FileEntry.cc
	* src/FileEntry.h
	* src/FtpNegotiationCommand.cc
	* src/HttpListenCommand.cc
	* src/HttpResponseCommand.cc
	* src/HttpServerResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/InOrderURISelector.cc
	* src/InOrderURISelector.h
	* src/Makefile.am
	* src/Makefile.in
	* src/Metalink2RequestGroup.cc
	* src/MultiUrlRequestInfo.cc
	* src/MultiUrlRequestInfo.h
	* src/OptionHandlerFactory.cc
	* src/PeerListenCommand.cc
	* src/RecoverableException.h
	* src/RequestGroup.cc
	* src/RequestGroup.h
	* src/RequestGroupMan.cc
	* src/RequestGroupMan.h
	* src/TimedHaltCommand.cc
	* src/TrackerWatcherCommand.cc
	* src/URIResult.cc
	* src/URIResult.h
	* src/URISelector.h
	* src/XmlRpcMethodImpl.cc
	* src/bittorrent_helper.cc
	* src/bittorrent_helper.h
	* src/download_helper.cc
	* src/main.cc
	* src/option_processing.cc
	* test/BtDependencyTest.cc
	* test/BtPostDownloadHandlerTest.cc
	* test/CookieStorageTest.cc
	* test/DefaultBtMessageDispatcherTest.cc
	* test/DownloadHandlerFactoryTest.cc
	* test/DownloadHelperTest.cc
	* test/FeedbackURISelectorTest.cc
	* test/FileEntryTest.cc
	* test/InOrderURISelectorTest.cc
	* test/Metalink2RequestGroupTest.cc
	* test/MetalinkPostDownloadHandlerTest.cc
	* test/RequestGroupManTest.cc
	* test/RequestGroupTest.cc
	* test/XmlRpcMethodTest.cc
2009-06-29 08:42:58 +00:00
Tatsuhiro Tsujikawa 100ed86b5c 2009-06-24 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated CookieStorageTest
	* test/CookieStorageTest.cc
2009-06-23 15:12:08 +00:00
Tatsuhiro Tsujikawa 383b12d7f1 2009-05-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --save-cookies option.
	* src/Cookie.cc
	* src/Cookie.h
	* src/CookieStorage.cc
	* src/CookieStorage.h
	* src/MultiUrlRequestInfo.cc
	* src/OptionHandlerFactory.cc
	* src/prefs.cc
	* src/prefs.h
	* src/usage_text.h
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
2009-05-22 14:51:57 +00:00
Tatsuhiro Tsujikawa d046c89ea7 2008-12-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the cookie implementation based on RFC2965. 
	Now if a value in domain field is not started with dot, then
	prepend dot. That means a cookie with domain=sf.net is sent to
	wiki.sf.net.
	* src/Cookie.cc
	* test/CookieParserTest.cc
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
	* test/NsCookieParserTest.cc
	* test/Sqlite3MozCookieParserTest.cc
2008-12-15 15:48:48 +00:00
Tatsuhiro Tsujikawa 915aa676f8 2008-10-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Treat Cookie object as session cookie if expiry = 0 is given.
	With this change, you can specify session scoped cookies in an
	external file setting expiry value to 0.
	* src/Cookie.cc
	* src/Cookie.h
	* test/CookieParserTest.cc
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
2008-10-26 14:22:58 +00:00
Tatsuhiro Tsujikawa 6779c72b5d 2008-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made Cookie immutable.
	* src/Cookie.cc
	* src/Cookie.h
	* src/CookieParser.cc
	* src/CookieParser.h
	* src/CookieStorage.cc
	* test/CookieParserTest.cc
	* test/CookieStorageTest.cc
	* test/NsCookieParserTest.cc
	* test/Sqlite3MozCookieParserTest.cc
2008-09-01 15:00:41 +00:00
Tatsuhiro Tsujikawa 398d53f5f5 2008-09-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use CookieStorage class instead of CookieBox class.
	Now CookieStorage accepts cookies from numeric host such as 
192.168.1.1.
	* src/AbstractProxyRequestCommand.cc
	* src/CookieStorage.cc
	* src/DownloadEngine.cc
	* src/DownloadEngine.h
	* src/HttpConnection.cc
	* src/HttpConnection.h
	* src/HttpRequest.cc
	* src/HttpRequest.h
	* src/HttpRequestCommand.cc
	* src/HttpResponse.cc
	* src/HttpResponseCommand.cc
	* src/HttpSkipResponseCommand.cc
	* src/Makefile.am
	* src/MultiUrlRequestInfo.cc
	* src/Request.cc
	* src/Request.h
	* src/main.cc
	* test/AllTest.cc
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/Makefile.am
	* test/NsCookieParserTest.cc
	* test/Sqlite3MozCookieParserTest.cc
	* test/nscookietest.txt
2008-09-01 13:46:03 +00:00
Tatsuhiro Tsujikawa 9ac91413dd 2008-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added tests for CookieStorage::load()
	* test/CookieStorageTest.cc
2008-08-27 16:31:43 +00:00
Tatsuhiro Tsujikawa 9cdcbf32ff 2008-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added CookieStorage class which is based on RFC2109 and manages 
cookies
	more strictly than CookieBox and CookieBoxFactory class.
	* src/CookieStorage.cc
	* src/CookieStorage.h
	* src/Cookie.cc
	* src/Cookie.h
	* test/CookieStorageTest.cc
	* test/CookieTest.cc
2008-08-27 16:04:36 +00:00