mirror of
https://github.com/aria2/aria2.git
synced 2025-04-04 21:17:41 +03:00
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
This commit is contained in:
parent
f670cdbba9
commit
398d53f5f5
29 changed files with 258 additions and 136 deletions
|
@ -85,6 +85,11 @@ void CookieTest::testValidate()
|
|||
Cookie nameEmpty("", "v", "/", "localhost", false);
|
||||
CPPUNIT_ASSERT(!nameEmpty.validate("localhost", "/"));
|
||||
}
|
||||
{
|
||||
Cookie fromNumericHost("k", "v", "/", "192.168.1.1", false);
|
||||
CPPUNIT_ASSERT(fromNumericHost.validate("192.168.1.1", "/"));
|
||||
CPPUNIT_ASSERT(!fromNumericHost.validate("www.aria2.org", "/"));
|
||||
}
|
||||
}
|
||||
|
||||
void CookieTest::testOperatorEqual()
|
||||
|
@ -127,6 +132,10 @@ void CookieTest::testMatch()
|
|||
CPPUNIT_ASSERT(expireTest.match("www.aria2.org", "/", 999, false));
|
||||
CPPUNIT_ASSERT(!expireTest.match("www.aria2.org", "/", 1000, false));
|
||||
CPPUNIT_ASSERT(!expireTest.match("www.aria2.org", "/", 1001, false));
|
||||
|
||||
Cookie fromNumericHost("k", "v", "/", "192.168.1.1", false);
|
||||
CPPUNIT_ASSERT(fromNumericHost.match("192.168.1.1", "/", 0, false));
|
||||
CPPUNIT_ASSERT(!fromNumericHost.match("www.aria2.org", "/", 0, false));
|
||||
}
|
||||
|
||||
void CookieTest::testIsExpired()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue