/** Attempts a direct connection */
private Socket attemptDirect() {
try {
- if (Log.verbose) Log.info(this, "attempting to create unproxied socket to " +
- host + ":" + port + (ssl ? " [ssl]" : ""));
+ Log.info(this, "attempting to create unproxied socket to " +
+ host + ":" + port + (ssl ? " [ssl]" : ""));
return getSocket(host, port, ssl, true);
} catch (IOException e) {
if (Log.on) Log.info(this, "exception in attemptDirect(): " + e);
throw new IOException("HTTP only supports http/https urls");
}
if (url.indexOf("://") == -1) throw new IOException("URLs must contain a ://");
- String temphost = url.substring(url.indexOf("://") + 1);
+ String temphost = url.substring(url.indexOf("://") + 3);
path = temphost.substring(temphost.indexOf('/'));
temphost = temphost.substring(0, temphost.indexOf('/'));
if (temphost.indexOf(':') != -1) {
if (authCache.get(originalUrl) != null) pw.print("Authorization: " + authCache.get(originalUrl) + "\r\n");
pw.print(content == null ? "\r\n" : content);
- pw.print("\r\n");
pw.flush();
}