response.setMessage("Internal Server Error");
_logger.log(Level.INFO, "clb.proxy.test.error_response");
return false;
}
if ((httpReq.getHeader(LoadBalancerProxyConstants.HTTP_PROXY_HEADER) != null)) {
Endpoint ep = new DefaultEndpoint();
ep.setLocal(true);
httpReq.setConvergedLoadBalancerEndpoint(ep);
return false;
}
InetSocketAddress remoteHost = RoundRobinPolicy.getInetSocketAddress(request);
if (_logger.isLoggable(Level.FINE)){
_logger.log(Level.FINE,"clb.proxy.test.remote_host", remoteHost);
}
if (remoteHost.getAddress().isLoopbackAddress() &&
(remoteHost.getPort() == ProxyConfig.getInstance().getLocalPort())) {
remoteEndpoint = new DefaultEndpoint();
remoteEndpoint.setLocal(true);
ret = false;
} else {
remoteEndpoint = new DefaultEndpoint(remoteHost);
httpReq.addHeader(LoadBalancerProxyConstants.HTTP_PROXY_HEADER,
remoteHost.getAddress().toString());
}
if (_logger.isLoggable(Level.FINEST)) {