Use new get_ip_host() method to get correct Host.

GitOrigin-RevId: 5ff0dc048c53abbc27d931b39374738ba9e25531
This commit is contained in:
levlam 2020-05-23 01:53:13 +03:00
parent 7a2feba897
commit e2fd1c13e9

View File

@ -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_;