Use new get_ip_host() method to get correct Host.
GitOrigin-RevId: 5ff0dc048c53abbc27d931b39374738ba9e25531
This commit is contained in:
parent
7a2feba897
commit
e2fd1c13e9
@ -20,13 +20,7 @@ void HttpProxy::send_connect() {
|
|||||||
CHECK(state_ == State::SendConnect);
|
CHECK(state_ == State::SendConnect);
|
||||||
state_ = State::WaitConnectResponse;
|
state_ = State::WaitConnectResponse;
|
||||||
|
|
||||||
string host;
|
string host = PSTRING() << ip_address_.get_ip_host() << ':' << ip_address_.get_port();
|
||||||
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 proxy_authorization;
|
string proxy_authorization;
|
||||||
if (!username_.empty() || !password_.empty()) {
|
if (!username_.empty() || !password_.empty()) {
|
||||||
auto userinfo = PSTRING() << username_ << ':' << password_;
|
auto userinfo = PSTRING() << username_ << ':' << password_;
|
||||||
|
Reference in New Issue
Block a user