Don't send basic auth header to service operated on differenct port.

When --http-auth-challenge=true, aria2 only sends basic auth header
when requested. Old implementation sends basic auth header to service
operated in different port in successive request. This change avoid
this bug.
This commit is contained in:
Tatsuhiro Tsujikawa 2011-07-27 23:28:31 +09:00
parent 02292feaba
commit 4ea28cb837
5 changed files with 56 additions and 33 deletions

View file

@ -244,7 +244,7 @@ void HttpRequestTest::testCreateRequest()
option_->put(PREF_HTTP_PASSWD, "aria2passwd");
CPPUNIT_ASSERT(authConfigFactory_->activateBasicCred
("localhost", "/", option_.get()));
("localhost", 8080, "/", option_.get()));
expectedText = "GET /archives/aria2-1.0.0.tar.bz2 HTTP/1.1\r\n"
"User-Agent: aria2\r\n"