Removes automatic port appending to "Host" header.

Previously, a `port` (443) was appended automatically to the "Host" header if the given `endpoint` URL is a secure URL (starts with "https://"). With this Pull Request a port is only appended if it is also present in the `endpoint` URL.