mirror of
https://github.com/aria2/aria2.git
synced 2026-04-02 10:55:00 +00:00
2008-11-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added the ability to pool proxy connection. The conneciton in FTP with proxy-method=GET is not pooled. Proxy-Connection header will not be sent when sending CONNECT method. * src/DownloadEngine.cc * src/DownloadEngine.h * src/FtpFinishDownloadCommand.cc * src/FtpInitiateConnectionCommand.cc * src/FtpNegotiationCommand.cc * src/HttpDownloadCommand.cc * src/HttpInitiateConnectionCommand.cc * src/HttpRequest.cc * src/HttpRequest.h * src/HttpResponse.cc * src/HttpSkipResponseCommand.cc * test/HttpRequestTest.cc * test/HttpResponseTest.cc
This commit is contained in:
@@ -471,7 +471,7 @@ void HttpRequestTest::testCreateProxyRequest()
|
||||
std::string expectedText = "CONNECT localhost:80 HTTP/1.1\r\n"
|
||||
"User-Agent: aria2\r\n"
|
||||
"Host: localhost:80\r\n"
|
||||
"Proxy-Connection: close\r\n"
|
||||
//"Proxy-Connection: close\r\n"
|
||||
"\r\n";
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(expectedText, httpRequest.createProxyRequest());
|
||||
@@ -482,7 +482,7 @@ void HttpRequestTest::testCreateProxyRequest()
|
||||
expectedText = "CONNECT localhost:80 HTTP/1.1\r\n"
|
||||
"User-Agent: aria2\r\n"
|
||||
"Host: localhost:80\r\n"
|
||||
"Proxy-Connection: Keep-Alive\r\n"
|
||||
//"Proxy-Connection: Keep-Alive\r\n"
|
||||
"\r\n";
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(expectedText, httpRequest.createProxyRequest());
|
||||
@@ -494,7 +494,7 @@ void HttpRequestTest::testCreateProxyRequest()
|
||||
expectedText = "CONNECT localhost:80 HTTP/1.1\r\n"
|
||||
"User-Agent: aria2\r\n"
|
||||
"Host: localhost:80\r\n"
|
||||
"Proxy-Connection: Keep-Alive\r\n"
|
||||
//"Proxy-Connection: Keep-Alive\r\n"
|
||||
"\r\n";
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(expectedText, httpRequest.createProxyRequest());
|
||||
@@ -506,7 +506,7 @@ void HttpRequestTest::testCreateProxyRequest()
|
||||
expectedText = "CONNECT localhost:80 HTTP/1.1\r\n"
|
||||
"User-Agent: aria2\r\n"
|
||||
"Host: localhost:80\r\n"
|
||||
"Proxy-Connection: Keep-Alive\r\n"
|
||||
//"Proxy-Connection: Keep-Alive\r\n"
|
||||
"Proxy-Authorization: Basic YXJpYTJwcm94eXVzZXI6YXJpYTJwcm94eXBhc3N3ZA==\r\n"
|
||||
"\r\n";
|
||||
|
||||
@@ -601,7 +601,7 @@ void HttpRequestTest::testUserAgent()
|
||||
std::string expectedTextForProxy = "CONNECT localhost:8080 HTTP/1.1\r\n"
|
||||
"User-Agent: aria2 (Linux)\r\n"
|
||||
"Host: localhost:8080\r\n"
|
||||
"Proxy-Connection: close\r\n"
|
||||
//"Proxy-Connection: close\r\n"
|
||||
"\r\n";
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(expectedTextForProxy, httpRequest.createProxyRequest());
|
||||
|
||||
Reference in New Issue
Block a user