diff options
author | Omair Majid <[email protected]> | 2013-09-23 12:34:25 -0400 |
---|---|---|
committer | Omair Majid <[email protected]> | 2013-09-23 12:34:25 -0400 |
commit | 0b4378d462bf9e44afe71d8c87adf682dd116c50 (patch) | |
tree | c91b0ace61b30e086d54c2a09f3d748a09c8461a /plugin/icedteanp | |
parent | 9ba69baff18dd24b207e0a8b6ad76133fe4ea536 (diff) |
Unit tests for JNLPProxySelector
This contains one functional change:
- String host = uri.getSchemeSpecificPart().split(":")[0];
+ String host = uri.getHost();
Given the URI of "socket://example.org", the first line
evaluates to "//example.org", while the second one (correctly)
evaluates to "example.org".
Diffstat (limited to 'plugin/icedteanp')
-rw-r--r-- | plugin/icedteanp/java/sun/applet/PluginMain.java | 2 | ||||
-rw-r--r-- | plugin/icedteanp/java/sun/applet/PluginProxySelector.java | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/plugin/icedteanp/java/sun/applet/PluginMain.java b/plugin/icedteanp/java/sun/applet/PluginMain.java index 3ceb119..3bfbfff 100644 --- a/plugin/icedteanp/java/sun/applet/PluginMain.java +++ b/plugin/icedteanp/java/sun/applet/PluginMain.java @@ -231,7 +231,7 @@ public class PluginMain { Authenticator.setDefault(new JNLPAuthenticator()); } // override the proxy selector set by JNLPRuntime - ProxySelector.setDefault(new PluginProxySelector()); + ProxySelector.setDefault(new PluginProxySelector(JNLPRuntime.getConfiguration())); } private static void setCookieHandler(PluginStreamHandler streamHandler) { diff --git a/plugin/icedteanp/java/sun/applet/PluginProxySelector.java b/plugin/icedteanp/java/sun/applet/PluginProxySelector.java index 32360fe..af6efc6 100644 --- a/plugin/icedteanp/java/sun/applet/PluginProxySelector.java +++ b/plugin/icedteanp/java/sun/applet/PluginProxySelector.java @@ -43,6 +43,7 @@ import java.net.URI; import java.util.ArrayList; import java.util.List; +import net.sourceforge.jnlp.config.DeploymentConfiguration; import net.sourceforge.jnlp.runtime.JNLPProxySelector; import net.sourceforge.jnlp.util.TimedHashMap; @@ -59,6 +60,10 @@ public class PluginProxySelector extends JNLPProxySelector { private TimedHashMap<String, Proxy> proxyCache = new TimedHashMap<String, Proxy>(); + public PluginProxySelector(DeploymentConfiguration config) { + super(config); + } + /** * Selects the appropriate proxy (or DIRECT connection method) for the given URI * |