Fixing port logic (#5576)

This commit is contained in:
Will-Low 2019-06-28 08:31:25 -04:00 committed by Teddy Reed
parent ce5fee3dd4
commit ae25976afd

View File

@ -201,7 +201,8 @@ void Client::sendRequest(STREAM_TYPE& stream,
if (client_options_.ssl_connection_ &&
(kHTTPSDefaultPort != *client_options_.remote_port_)) {
host_header_value += ':' + *client_options_.remote_port_;
} else if (kHTTPDefaultPort != *client_options_.remote_port_) {
} else if (!client_options_.ssl_connection_ &&
kHTTPDefaultPort != *client_options_.remote_port_) {
host_header_value += ':' + *client_options_.remote_port_;
}
req.set(beast_http::field::host, host_header_value);