2008-04-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Rewritten HTTP keep-alive and pipelining routine.
	* src/AbstractCommand.cc
	* src/HttpConnection.cc
	* src/HttpDownloadCommand.cc
	* src/HttpRequest.cc
	* src/HttpRequestCommand.cc
	* src/HttpResponseCommand.cc
	* src/Request.cc
	* src/Request.h
	* src/RequestGroup.cc
	* test/HttpRequestTest.cc
	* test/HttpResponseTest.cc
	* test/RequestTest.cc
This commit is contained in:
Tatsuhiro Tsujikawa 2008-04-22 07:15:35 +00:00
parent f1816a1d4b
commit 1c7c6f9898
13 changed files with 173 additions and 82 deletions

View file

@ -258,13 +258,13 @@ void RequestTest::testSetUrl17()
void RequestTest::testRedirectUrl() {
Request req;
req.setKeepAlive(true);
req.supportsPersistentConnection(true);
req.setUrl("http://aria.rednoah.com:8080/aria2/index.html");
bool v2 = req.redirectUrl("http://aria.rednoah.co.jp/");
CPPUNIT_ASSERT(v2);
// keep-alive set to be false after redirection
CPPUNIT_ASSERT(!req.isKeepAlive());
// persistent connection flag is set to be false 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());