// Get the proxy config to use for the host.
final Proxy proxy = manager.getProxy(url.getHost());
if (proxy != null) {
configuration.setProxy(proxy.getHost(), proxy.getPort());
if (proxy.useAuthorization()) {
method.setDoAuthentication(true);
// mock up a authentication challenge so we can get
// the response (which can be sent before the
// challenge if we want to save time and effort)