if (_sslState == null) { if (_shouldProxySSL) sslget = new SSLEepGet(_context, _sproxyType, _sproxyHost, _sproxyPort, baos, url.toString()); else sslget = new SSLEepGet(_context, baos, url.toString()); sslget = new SSLEepGet(_context, _sproxyType, _sproxyHost, _sproxyPort, baos, url.toString(), _sslState); else sslget = new SSLEepGet(_context, baos, url.toString(), _sslState);
if (_sslState == null) { if (_shouldProxySSL) sslget = new SSLEepGet(_context, _sproxyType, _sproxyHost, _sproxyPort, out.getPath(), url.toString()); else sslget = new SSLEepGet(_context, out.getPath(), url.toString()); sslget = new SSLEepGet(_context, _sproxyType, _sproxyHost, _sproxyPort, out.getPath(), url.toString(), _sslState); else sslget = new SSLEepGet(_context, out.getPath(), url.toString(), _sslState);
/** * @return null if not found */ private String query(String host, boolean isv6, List<String> toQuery) { for (String url : toQuery) { if (fails.count(url) > MAX_FAILS) continue; int tcode = isv6 ? V6_CODE : V4_CODE; String furl = url + "name=" + host + "&type=" + tcode; log("Fetching " + furl); baos.reset(); SSLEepGet eepget = new SSLEepGet(ctx, baos, furl, state); if (ctx.isRouterContext()) eepget.addStatusListener(this); else fetchStart = System.currentTimeMillis(); // debug String rv = fetch(eepget, host, isv6); if (rv != null) { fails.clear(url); return rv; } if (state == null) state = eepget.getSSLState(); // we treat all fails the same, whether server responded or not fails.increment(url); log("No result from " + furl); } return null; }