HttpRequestHandler rh = drh;
rh = new LoggingHttpRequestHandler(rh);
BufferedMessageInterceptor bmi = setInterseptor();
rh = new BufferingHttpRequestHandler(rh, bmi, 10240);
HttpProxyConnectionHandler hpch = new HttpProxyConnectionHandler(rh);
SSLContextSelector cp = getSSLContextSelector();
TargetedConnectionHandler tch = new SSLConnectionHandler(cp, true, hpch);
tch = new LoopAvoidingTargetedConnectionHandler(sg, tch);
hpch.setConnectHandler(tch);