mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Using url parameter for communicating the need for base64 instead of upgrade packet for WebSocket
This commit is contained in:
@@ -247,9 +247,7 @@ Socket.prototype.probe = function (name) {
|
||||
transport.removeListener('error', onerror);
|
||||
self.emit('upgrade', transport);
|
||||
self.setTransport(transport);
|
||||
var upgradePacket = { type: 'upgrade' };
|
||||
if (!transport.supportsBinary) { upgradePacket.data = 'b64' };
|
||||
transport.send([upgradePacket]);
|
||||
transport.send([{ type: 'upgrade' }]);
|
||||
transport = null;
|
||||
self.upgrading = false;
|
||||
self.flush();
|
||||
|
||||
@@ -198,6 +198,9 @@ WS.prototype.uri = function(){
|
||||
query[this.timestampParam] = +new Date;
|
||||
}
|
||||
|
||||
// communicate binary support capabilities
|
||||
if (!this.supportsBinary) { query.b64 = 1; }
|
||||
|
||||
query = util.qs(query);
|
||||
|
||||
// prepend ? to query
|
||||
|
||||
Reference in New Issue
Block a user