Use hostname rather than host when appending a port manually.

The host attribute returns the port as well as the hostname.
This commit is contained in:
Ms2ger 2015-06-21 16:52:17 +02:00
parent d2d51d4776
commit 4a90f21e42

View file

@ -13,6 +13,6 @@ var tests = [
];
//Pass condition is to not throw
for (var i = 0; i < tests.length; ++i) {
test(function(){new WebSocket(tests[i][0] + location.host + ':' + tests[i][1] + '/echo')}, tests[i][0]);
test(function(){new WebSocket(tests[i][0] + location.hostname + ':' + tests[i][1] + '/echo')}, tests[i][0]);
}
</script>