mirror of https://github.com/aria2/aria2
2009-10-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed wrong insertion point for BasicCred. * src/AuthConfigFactory.ccpull/1/head
parent
4536bd7211
commit
947effdf1c
|
@ -1,3 +1,8 @@
|
|||
2009-10-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fixed wrong insertion point for BasicCred.
|
||||
* src/AuthConfigFactory.cc
|
||||
|
||||
2009-10-17 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Allowed non-regular file in LocalFilePathOptionHandler
|
||||
|
|
|
@ -164,20 +164,17 @@ bool AuthConfigFactory::activateBasicCred
|
|||
(const std::string& host, const std::string& path, const Option* op)
|
||||
{
|
||||
|
||||
std::deque<BasicCred>::iterator i =
|
||||
findBasicCred(host, path);
|
||||
std::deque<BasicCred>::iterator i = findBasicCred(host, path);
|
||||
if(i == _basicCreds.end()) {
|
||||
SharedHandle<AuthConfig> authConfig =
|
||||
createHttpAuthResolver(op)->resolveAuthConfig(host);
|
||||
if(authConfig.isNull()) {
|
||||
return false;
|
||||
} else {
|
||||
BasicCred bc("", "", host, path);
|
||||
BasicCred bc(authConfig->getUser(), authConfig->getPassword(),
|
||||
host, path, true);
|
||||
i = std::lower_bound(_basicCreds.begin(), _basicCreds.end(), bc);
|
||||
// TODO setting "/" as path. Should we use path instead?
|
||||
_basicCreds.insert
|
||||
(i, BasicCred(authConfig->getUser(), authConfig->getPassword(),
|
||||
host, "/", true));
|
||||
_basicCreds.insert(i, bc);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue