diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-16 00:01:00 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-16 00:01:00 +0000 |
commit | facc82690a523e5e97b6acda33863631eb2482d3 (patch) | |
tree | ca1cec84ed3ea649107569a0568ed234f2f5ffd1 | |
parent | 6920720802ba0bef2908c562b6eedf2eb6762a64 (diff) | |
download | chromium_src-facc82690a523e5e97b6acda33863631eb2482d3.zip chromium_src-facc82690a523e5e97b6acda33863631eb2482d3.tar.gz chromium_src-facc82690a523e5e97b6acda33863631eb2482d3.tar.bz2 |
Use the new HostNoBrackets() method in more places.
Note that IP addresses in certificate names are encoded
in binary form (octet strings -- 4 octets for IPv4 and
16 octets for IPv6).
R=eroman
http://crbug.com/12005
TEST=covered by current tests
Review URL: http://codereview.chromium.org/113438
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16213 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/base/auth.h | 4 | ||||
-rw-r--r-- | net/http/http_network_transaction.cc | 4 | ||||
-rw-r--r-- | net/url_request/url_request_ftp_job.cc | 15 |
3 files changed, 12 insertions, 11 deletions
diff --git a/net/base/auth.h b/net/base/auth.h index 6f1383e..b404f7a 100644 --- a/net/base/auth.h +++ b/net/base/auth.h @@ -18,7 +18,7 @@ class AuthChallengeInfo : public: bool is_proxy; // true for Proxy-Authenticate, false for WWW-Authenticate. std::wstring host; // the domain name of the server asking for auth - // (could be the proxy). + // (could be the proxy). std::wstring scheme; // "Basic", "Digest", or whatever other method is used. std::wstring realm; // the realm provided by the server, if there is one. @@ -27,7 +27,7 @@ class AuthChallengeInfo : ~AuthChallengeInfo() {} }; -//Authentication structures +// Authentication structures enum AuthState { AUTH_STATE_DONT_NEED_AUTH, AUTH_STATE_NEED_AUTH, diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index 5d0e733..99a02ba 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc @@ -654,8 +654,8 @@ int HttpNetworkTransaction::DoSSLConnect() { // Add a SSL socket on top of our existing transport socket. ClientSocket* s = connection_.release_socket(); - s = socket_factory_->CreateSSLClientSocket(s, request_->url.host(), - ssl_config_); + s = socket_factory_->CreateSSLClientSocket( + s, request_->url.HostNoBrackets(), ssl_config_); connection_.set_socket(s); return connection_.socket()->Connect(&io_callback_); } diff --git a/net/url_request/url_request_ftp_job.cc b/net/url_request/url_request_ftp_job.cc index 00a62ac..2d2658b 100644 --- a/net/url_request/url_request_ftp_job.cc +++ b/net/url_request/url_request_ftp_job.cc @@ -147,13 +147,14 @@ void URLRequestFtpJob::SendRequest() { int port = request_->url().has_port() ? request_->url().IntPort() : INTERNET_DEFAULT_FTP_PORT; - connection_handle_ = InternetConnectA(GetTheInternet(), - request_->url().host().c_str(), - port, - have_auth ? username.c_str() : NULL, - have_auth ? password.c_str() : NULL, - INTERNET_SERVICE_FTP, flags, - reinterpret_cast<DWORD_PTR>(this)); + connection_handle_ = InternetConnectA( + GetTheInternet(), + request_->url().HostNoBrackets().c_str(), + port, + have_auth ? username.c_str() : NULL, + have_auth ? password.c_str() : NULL, + INTERNET_SERVICE_FTP, flags, + reinterpret_cast<DWORD_PTR>(this)); if (connection_handle_) { OnConnect(); |