diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-07-27 23:28:31 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-07-27 23:28:31 +0900 |
| commit | 4ea28cb8377bc7b4654e6ae0216db6a7425d12c9 (patch) | |
| tree | 27c63eb57a315ab5ab7596ac46da2ac840d9ef19 /src/AuthConfigFactory.h | |
| parent | 02292feaba560e379acec7f7477a0c50c679d0dc (diff) | |
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.
Diffstat (limited to 'src/AuthConfigFactory.h')
| -rw-r--r-- | src/AuthConfigFactory.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/AuthConfigFactory.h b/src/AuthConfigFactory.h index 1291b225..8eb70f31 100644 --- a/src/AuthConfigFactory.h +++ b/src/AuthConfigFactory.h @@ -67,11 +67,12 @@ public: std::string user_; std::string password_; std::string host_; + uint16_t port_; std::string path_; bool activated_; BasicCred(const std::string& user, const std::string& password, - const std::string& host, const std::string& path, + const std::string& host, uint16_t port, const std::string& path, bool activated = false); void activate(); @@ -106,12 +107,19 @@ public: // using this AuthConfig object with given host and path "/" and // returns true. bool activateBasicCred - (const std::string& host, const std::string& path, const Option* op); - - // Find a BasicCred using host and path and return the iterator - // pointing to it. If not found, then return basicCreds_.end(). + (const std::string& host, + uint16_t port, + const std::string& path, + const Option* op); + + // Find a BasicCred using host, port and path and return the + // iterator pointing to it. If not found, then return + // basicCreds_.end(). std::deque<AuthConfigFactory::BasicCred>::iterator - findBasicCred(const std::string& host, const std::string& path); + findBasicCred + (const std::string& host, + uint16_t port, + const std::string& path); // If the same BasicCred is already added, then it is replaced with // given basicCred. Otherwise, insert given basicCred to |
