Skip to content

Commit

Permalink
lib-http: client: Use the new http_url_get_port*() functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch authored and sirainen committed Feb 26, 2018
1 parent 777776d commit eb580ab
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/lib-http/http-client-request.c
Expand Up @@ -851,21 +851,19 @@ http_client_request_get_peer_addr(const struct http_client_request *req,
addr->type = HTTP_CLIENT_PEER_ADDR_RAW;
addr->a.tcp.ip = host_url->host.ip;
addr->a.tcp.port =
(host_url->port != 0 ? host_url->port : HTTPS_DEFAULT_PORT);
http_url_get_port_default(host_url, HTTPS_DEFAULT_PORT);
} else if (host_url->have_ssl) {
if (req->ssl_tunnel)
addr->type = HTTP_CLIENT_PEER_ADDR_HTTPS_TUNNEL;
else
addr->type = HTTP_CLIENT_PEER_ADDR_HTTPS;
addr->a.tcp.ip = host_url->host.ip;
addr->a.tcp.https_name = host_url->host.name;
addr->a.tcp.port =
(host_url->port != 0 ? host_url->port : HTTPS_DEFAULT_PORT);
addr->a.tcp.port = http_url_get_port(host_url);
} else {
addr->type = HTTP_CLIENT_PEER_ADDR_HTTP;
addr->a.tcp.ip = host_url->host.ip;
addr->a.tcp.port =
(host_url->port != 0 ? host_url->port : HTTP_DEFAULT_PORT);
addr->a.tcp.port = http_url_get_port(host_url);
}
}

Expand Down

0 comments on commit eb580ab

Please sign in to comment.