diff options
| author | levlam <levlam@telegram.org> | 2020-05-23 01:53:13 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2020-05-23 01:53:13 +0300 |
| commit | e2fd1c13e9a0fbb21aa2992b7b2b2b4a7e66204a (patch) | |
| tree | 11648b1d8b43876ab9b557cf3cd441afc009ea85 /tdnet/td/net/HttpProxy.cpp | |
| parent | 7a2feba897c29ff71571770bb1e51d0e6e6793f0 (diff) | |
Use new get_ip_host() method to get correct Host.
GitOrigin-RevId: 5ff0dc048c53abbc27d931b39374738ba9e25531
Diffstat (limited to 'tdnet/td/net/HttpProxy.cpp')
| -rw-r--r-- | tdnet/td/net/HttpProxy.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tdnet/td/net/HttpProxy.cpp b/tdnet/td/net/HttpProxy.cpp index ce9a441aa..74c75c0e4 100644 --- a/tdnet/td/net/HttpProxy.cpp +++ b/tdnet/td/net/HttpProxy.cpp @@ -20,13 +20,7 @@ void HttpProxy::send_connect() { CHECK(state_ == State::SendConnect); state_ = State::WaitConnectResponse; - string host; - if (ip_address_.is_ipv6()) { - host = PSTRING() << "[" << ip_address_.get_ip_str() << "]" << ':' << ip_address_.get_port(); - } else { - host = PSTRING() << ip_address_.get_ip_str() << ':' << ip_address_.get_port(); - } - + string host = PSTRING() << ip_address_.get_ip_host() << ':' << ip_address_.get_port(); string proxy_authorization; if (!username_.empty() || !password_.empty()) { auto userinfo = PSTRING() << username_ << ':' << password_; |
