mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
transports: fix for Connection: close [stbuehler] (fixes #406)
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
var HTTPPolling = require('./http-polling');
|
||||
var jsonpolling_re = /^\d+$/
|
||||
var jsonpolling_re = /^\d+$/;
|
||||
|
||||
/**
|
||||
* Export the constructor.
|
||||
@@ -83,12 +83,12 @@ JSONPPolling.prototype.doWrite = function (data) {
|
||||
HTTPPolling.prototype.doWrite.call(this);
|
||||
|
||||
var data = data === undefined
|
||||
? '' : this.head + JSON.stringify(data) + this.foot;
|
||||
? ''
|
||||
: this.head + JSON.stringify(data) + this.foot;
|
||||
|
||||
this.response.writeHead(200, {
|
||||
'Content-Type': 'text/javascript; charset=UTF-8'
|
||||
, 'Content-Length': Buffer.byteLength(data)
|
||||
, 'Connection': 'Keep-Alive'
|
||||
, 'X-XSS-Protection': '0'
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user