summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_ftp_job.cc
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-16 00:01:00 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-16 00:01:00 +0000
commitfacc82690a523e5e97b6acda33863631eb2482d3 (patch)
treeca1cec84ed3ea649107569a0568ed234f2f5ffd1 /net/url_request/url_request_ftp_job.cc
parent6920720802ba0bef2908c562b6eedf2eb6762a64 (diff)
downloadchromium_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
Diffstat (limited to 'net/url_request/url_request_ftp_job.cc')
-rw-r--r--net/url_request/url_request_ftp_job.cc15
1 files changed, 8 insertions, 7 deletions
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();