Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2015-12-22 18:21:51 +0000
committerRoland Grunberg2015-12-22 19:38:01 +0000
commit238db3e8387fc1bb9a9a2644e6080f9f7b66e207 (patch)
treed2f255affb519b90d44ebad46d8a87c920f9a6ac /containers
parentf9b2b5ee0523eeb8b6a4d010c150389a0e79dadf (diff)
downloadorg.eclipse.linuxtools-238db3e8387fc1bb9a9a2644e6080f9f7b66e207.tar.gz
org.eclipse.linuxtools-238db3e8387fc1bb9a9a2644e6080f9f7b66e207.tar.xz
org.eclipse.linuxtools-238db3e8387fc1bb9a9a2644e6080f9f7b66e207.zip
Bug 484815: Fix Show in Web Browser command for unix socket connections.
Change-Id: I9bcb587a282b28c28cbfb66931198a1cd62ebc76 Reviewed-on: https://git.eclipse.org/r/63173 Tested-by: Hudson CI Reviewed-by: Roland Grunberg <rgrunber@redhat.com> (cherry picked from commit fe66cd1706458d40a15efb1cab741898654daadb) Reviewed-on: https://git.eclipse.org/r/63177
Diffstat (limited to 'containers')
-rw-r--r--containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/ShowInWebBrowserCommandHandler.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/ShowInWebBrowserCommandHandler.java b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/ShowInWebBrowserCommandHandler.java
index 21a47df797..997982bd68 100644
--- a/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/ShowInWebBrowserCommandHandler.java
+++ b/containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/commands/ShowInWebBrowserCommandHandler.java
@@ -65,9 +65,11 @@ public class ShowInWebBrowserCommandHandler extends AbstractHandler {
.equalsIgnoreCase(connectionURI.getScheme())
|| "https".equalsIgnoreCase( //$NON-NLS-1$
connectionURI.getScheme())) {
- final String host = connectionURI.getHost();
+ final String host = "unix" //$NON-NLS-1$
+ .equalsIgnoreCase(connectionURI.getScheme())
+ ? "127.0.0.1" : connectionURI.getHost(); //$NON-NLS-1$
final URL location = new URL("http", host, //$NON-NLS-1$
- selectedPort.getPublicPort(), "/");
+ selectedPort.getPublicPort(), "/"); //$NON-NLS-1$
openLocationInWebBrowser(location);
}
} catch (URISyntaxException | MalformedURLException e) {

Back to the top