Skip to content

Commit

Permalink
Fixing port logic (#5576)
Browse files Browse the repository at this point in the history
  • Loading branch information
Will-Low authored and theopolis committed Jun 28, 2019
1 parent ce5fee3 commit ae25976
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion osquery/remote/http_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ae25976

Please sign in to comment.