diff options
Diffstat (limited to 'net/url_request/url_request_ftp_job.cc')
-rw-r--r-- | net/url_request/url_request_ftp_job.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/url_request/url_request_ftp_job.cc b/net/url_request/url_request_ftp_job.cc index eca845a..bc7f085 100644 --- a/net/url_request/url_request_ftp_job.cc +++ b/net/url_request/url_request_ftp_job.cc @@ -138,7 +138,8 @@ void URLRequestFtpJob::SendRequest() { username = WideToUTF8(server_auth_->username); password = WideToUTF8(server_auth_->password); request_->context()->ftp_auth_cache()->Add(request_->url().GetOrigin(), - server_auth_.get()); + server_auth_->username, + server_auth_->password); } else { if (request_->url().has_username()) { username = request_->url().username(); @@ -183,13 +184,15 @@ void URLRequestFtpJob::OnIOComplete(const AsyncResult& result) { GURL origin = request_->url().GetOrigin(); if (server_auth_ != NULL && server_auth_->state == net::AUTH_STATE_HAVE_AUTH) { - request_->context()->ftp_auth_cache()->Remove(origin); + request_->context()->ftp_auth_cache()->Remove(origin, + server_auth_->username, + server_auth_->password); } else { server_auth_ = new net::AuthData(); } server_auth_->state = net::AUTH_STATE_NEED_AUTH; - scoped_refptr<net::AuthData> cached_auth = + net::FtpAuthCache::Entry* cached_auth = request_->context()->ftp_auth_cache()->Lookup(origin); if (cached_auth) { |