Strip the port when caching the host part of URLs

Fixes #888
This commit is contained in:
Frank Denis 2019-09-07 15:31:34 +02:00
parent deaad9ce2b
commit 6b1966b38f
2 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,9 @@ been set to `true`.
- New command-line option: `-show-certs` to print DoH certificate
hashes.
- Solaris packages are now provided.
- DoH servers on a non-standard port, with stamps that don't include
IP addresses, and without working system resolvers can now be properly
bootstrapped.
* Version 2.0.25
- The example IP address for network probes didn't work on Windows.

View File

@ -224,7 +224,7 @@ func (xTransport *XTransport) Fetch(method string, url *url.URL, accept string,
req.Body = bc
}
var err error
host := url.Host
host := ExtractHost(url.Host)
if xTransport.proxyDialer == nil && strings.HasSuffix(host, ".onion") {
return nil, 0, errors.New("Onion service is not reachable without Tor")
}