sslContext = getSSLContext(transportOut);
sslIOSessionHandler = getSSLIOSessionHandler(transportOut);
// configure proxy settings - only supports HTTP right now (See SYNAPSE-418)
if (sslContext == null) {
Parameter proxyHostParam = transportOut.getParameter("http.proxyHost");
if (proxyHostParam != null || System.getProperty("http.proxyHost") != null) {
if (proxyHostParam != null) {
proxyHost = (String) proxyHostParam.getValue();
} else {
proxyHost = System.getProperty("http.proxyHost");
}
Parameter proxyPortParam = transportOut.getParameter("http.proxyPort");
if (proxyPortParam != null) {
proxyPort = Integer.parseInt((String) proxyPortParam.getValue());
} else if (System.getProperty("http.proxyPort") != null) {
proxyPort = Integer.parseInt(System.getProperty("http.proxyPort"));
}
Parameter bypassList = transportOut.getParameter("http.nonProxyHosts");
if (bypassList != null) {
proxyBypassList = ((String) bypassList.getValue()).split("\\|");
} else if (System.getProperty("http.nonProxyHosts") != null) {
proxyBypassList = (System.getProperty("http.nonProxyHosts")).split("\\|");
}
log.info("HTTP Sender using Proxy : "
+ proxyHost + ":" + proxyPort + " bypassing : " + Arrays.toString(proxyBypassList));
}
}
Parameter param = transportOut.getParameter("warnOnHTTP500");
if (param != null) {
String[] warnOnHttp500 = ((String) param.getValue()).split("\\|");
cfgCtx.setNonReplicableProperty("warnOnHTTP500", warnOnHttp500);
}
preserveUserAgentHeader = NHttpConfiguration.getInstance().isPreserveUserAgentHeader();
preserveServerHeader = NHttpConfiguration.getInstance().isPreserveServerHeader();