Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delegate name resolution to proxy in DefaultHttpClient (#6761)
When using a proxy, the destination address should be passed to that proxy unresolved, letting the proxy decide how to resolve it. This can be relevant if, for example, DNS for the local host is restricted. The normal netty resolver infrastructure has some benefits (e.g. it's asynchronous), but when proxies are used, we don't need those features, because we can forward the unresolved name anyway. This patch does not have a config property to revert to the old behavior, because I can't think of a reasonable purpose in doing that. There are two potential downsides to the new behavior: - Someone might want to request from a host that resolves differently (or not at all) on the proxy she uses. I'd be very surprised if anyone does this. - There is a potential privacy impact – the proxy can now see the hostname, not just the IP. However the hostname is almost always also available through other means (SNI, the Host header). There are no tests in this patch. A test would require setting up a HTTP proxy. Fixes #6617
- Loading branch information