Wrap IPv6 literals with brackets. Fixes #323.
This commit is contained in:
parent
3234ffd353
commit
b8c4b1fbac
|
@ -260,6 +260,10 @@ function($rootScope,
|
||||||
|
|
||||||
var connect = function (host, port, passwd, ssl, noCompression) {
|
var connect = function (host, port, passwd, ssl, noCompression) {
|
||||||
var proto = ssl ? 'wss' : 'ws';
|
var proto = ssl ? 'wss' : 'ws';
|
||||||
|
// If host is an IPv6 literal wrap it in brackets
|
||||||
|
if (host.indexOf(":") !== -1) {
|
||||||
|
host = "[" + host + "]";
|
||||||
|
}
|
||||||
var url = proto + "://" + host + ":" + port + "/weechat";
|
var url = proto + "://" + host + ":" + port + "/weechat";
|
||||||
$log.debug('Connecting to URL: ', url);
|
$log.debug('Connecting to URL: ', url);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue