mirror of
https://github.com/aria2/aria2.git
synced 2026-04-02 18:59:20 +00:00
2008-05-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Set _supportsPersistentConnection to true by default. * src/Request.cc * src/RequestGroup.cc * test/HttpRequestTest.cc * test/RequestTest.cc
This commit is contained in:
@@ -271,13 +271,13 @@ void RequestTest::testSetUrl17()
|
||||
|
||||
void RequestTest::testRedirectUrl() {
|
||||
Request req;
|
||||
req.supportsPersistentConnection(true);
|
||||
req.supportsPersistentConnection(false);
|
||||
req.setUrl("http://aria.rednoah.com:8080/aria2/index.html");
|
||||
|
||||
bool v2 = req.redirectUrl("http://aria.rednoah.co.jp/");
|
||||
CPPUNIT_ASSERT(v2);
|
||||
// persistent connection flag is set to be false after redirection
|
||||
CPPUNIT_ASSERT(!req.supportsPersistentConnection());
|
||||
// persistent connection flag is set to be true after redirection
|
||||
CPPUNIT_ASSERT(req.supportsPersistentConnection());
|
||||
// url must be the same
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.com:8080/aria2/index.html"),
|
||||
req.getUrl());
|
||||
|
||||
Reference in New Issue
Block a user