Skip to content

Commit

Permalink
Use new get_ip_host() method to get correct Host.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 5ff0dc048c53abbc27d931b39374738ba9e25531
  • Loading branch information
levlam committed May 22, 2020
1 parent 7a2feba commit e2fd1c1
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tdnet/td/net/HttpProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down

0 comments on commit e2fd1c1

Please sign in to comment.