mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Fixed situation where there's a location.port but we're using https://, in which
case we want to do 443.
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
* @param {Object} uri
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
util.uniqueUri = function (uri) {
|
||||
var protocol = uri.protocol
|
||||
, host = uri.host
|
||||
@@ -54,13 +54,12 @@
|
||||
|
||||
if ('undefined' != typeof document) {
|
||||
host = host || document.domain;
|
||||
port = port || document.location.port;
|
||||
port = port || (protocol == 'https' ? 443 : document.location.port);
|
||||
} else {
|
||||
host = host || 'localhost';
|
||||
}
|
||||
|
||||
return (protocol || 'http') + '://' + host + ':' +
|
||||
(port || (protocol === 'https' ? 443 : 80));
|
||||
return (protocol || 'http') + '://' + host + ':' + (port || 80);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user