engine.io
Advanced tools
Comparing version 1.4.0 to 1.4.1
1.4.1 / 2014-10-03 | ||
================== | ||
* socket: allow upgrades if the socket is still in closing state | ||
* README: fix typo | ||
1.4.0 / 2014-09-03 | ||
@@ -3,0 +9,0 @@ ================== |
@@ -179,3 +179,3 @@ /** | ||
self.checkIntervalTimer = setInterval(check, 100); | ||
} else if ('upgrade' == packet.type && self.readyState == 'open') { | ||
} else if ('upgrade' == packet.type && self.readyState != 'closed') { | ||
debug('got upgrade packet - upgrading'); | ||
@@ -192,2 +192,7 @@ self.upgraded = true; | ||
transport.removeListener('packet', onPacket); | ||
if (self.readyState == 'closing') { | ||
transport.close(function () { | ||
self.onClose('forced close'); | ||
}); | ||
} | ||
} else { | ||
@@ -194,0 +199,0 @@ transport.close(); |
@@ -159,8 +159,18 @@ | ||
self.onData(chunks); | ||
res.writeHead(200, self.headers(req, { | ||
'Content-Length': 2 | ||
// text/html is required instead of text/plain to avoid an | ||
// unwanted download dialog on certain user-agents (GH-43) | ||
, 'Content-Type': 'text/html' | ||
})); | ||
var headers = { | ||
// text/html is required instead of text/plain to avoid an | ||
// unwanted download dialog on certain user-agents (GH-43) | ||
'Content-Type': 'text/html', | ||
'Content-Length': 2 | ||
}; | ||
// prevent XSS warnings on IE | ||
// https://github.com/LearnBoost/socket.io/pull/1333 | ||
var ua = req.headers['user-agent']; | ||
if (ua && (~ua.indexOf(';MSIE') || ~ua.indexOf('Trident/'))) { | ||
headers['X-XSS-Protection'] = '0'; | ||
} | ||
res.writeHead(200, self.headers(req, headers)); | ||
res.end('ok'); | ||
@@ -167,0 +177,0 @@ cleanup(); |
{ | ||
"name": "engine.io", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "The realtime engine behind Socket.IO. Provides the foundation of a bidirectional connection between client and server", | ||
@@ -28,3 +28,3 @@ "main": "./lib/engine.io", | ||
"superagent": "0.15.4", | ||
"engine.io-client": "1.4.0", | ||
"engine.io-client": "1.4.1", | ||
"s": "0.1.1" | ||
@@ -31,0 +31,0 @@ }, |
@@ -144,3 +144,3 @@ | ||
// immediately attach | ||
var eioServer = require('engine.io')(http_server); | ||
var eioServer = require('engine.io')(httpServer); | ||
``` | ||
@@ -147,0 +147,0 @@ |
64408
1354