X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Forg%2Fibex%2Fnet%2FHTTP.java;h=5f8a4edb962813cab8b2f28401f3ff315cca2588;hb=fffcafc33aa4066bdf85da7a32e1a1cdb9db2d6f;hp=0142a9e743911102568869ecc58d4573d23c4161;hpb=8e190fb0ff508ccf4962bbfbf8295a431805c12b;p=org.ibex.core.git diff --git a/src/org/ibex/net/HTTP.java b/src/org/ibex/net/HTTP.java index 0142a9e..5f8a4ed 100644 --- a/src/org/ibex/net/HTTP.java +++ b/src/org/ibex/net/HTTP.java @@ -180,8 +180,8 @@ public class HTTP { /** 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); @@ -328,7 +328,7 @@ public class HTTP { 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) { @@ -380,7 +380,6 @@ public class HTTP { 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(); } @@ -827,7 +826,7 @@ public class HTTP { return super.get(name); } - private static final JS proxyConfigBindings = new JS(); + private static final JS proxyConfigBindings = new JS.O(); private static final JS ProxyConfig = new JS() { public Object get(Object name) { if (name.equals("bindings")) return proxyConfigBindings;