Socket
Socket
Sign inDemoInstall

engine.io-client

Package Overview
Dependencies
Maintainers
1
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

engine.io-client - npm Package Compare versions

Comparing version 0.7.12 to 0.7.13

.zuul.yml

8

History.md
0.7.13 / 2013-12-20
===================
* use `jsonp` in favor of `XDomainRequest` to preserve `Cookie`
headers in all situations [3rd-eden] (fixes #217)
* run zuul tests after node tests [defunctzombie]
* add zuul support for easier browser testing [defunctzombie]
0.7.12 / 2013-11-11

@@ -3,0 +11,0 @@ ===================

8

lib/transports/index.js

@@ -35,4 +35,3 @@

var xhr
, xd = false
, isXProtocol = false;
, xd = false;

@@ -49,10 +48,5 @@ if (global.location) {

xd = opts.hostname != location.hostname || port != opts.port;
isXProtocol = opts.secure != isSSL;
}
xhr = util.request(xd, opts);
/* See #7 at http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx */
if (isXProtocol && global.XDomainRequest && xhr instanceof global.XDomainRequest) {
return new JSONP(opts);
}

@@ -59,0 +53,0 @@ if (xhr && !opts.forceJSONP) {

@@ -167,45 +167,29 @@ /**

try {
if (xhr.setRequestHeader) {
// xmlhttprequest
xhr.setRequestHeader('Content-type', 'text/plain;charset=UTF-8');
} else {
// xdomainrequest
xhr.contentType = 'text/plain';
}
xhr.setRequestHeader('Content-type', 'text/plain;charset=UTF-8');
} catch (e) {}
}
if (this.xd && global.XDomainRequest && xhr instanceof XDomainRequest) {
xhr.onerror = function(e){
self.onError(e);
};
xhr.onload = function(){
self.onData(xhr.responseText);
};
xhr.onprogress = empty;
} else {
// ie6 check
if ('withCredentials' in xhr) {
xhr.withCredentials = true;
}
// ie6 check
if ('withCredentials' in xhr) {
xhr.withCredentials = true;
}
xhr.onreadystatechange = function(){
var data;
xhr.onreadystatechange = function(){
var data;
try {
if (4 != xhr.readyState) return;
if (200 == xhr.status || 1223 == xhr.status) {
data = xhr.responseText;
} else {
self.onError(xhr.status);
}
} catch (e) {
self.onError(e);
try {
if (4 != xhr.readyState) return;
if (200 == xhr.status || 1223 == xhr.status) {
data = xhr.responseText;
} else {
self.onError(xhr.status);
}
} catch (e) {
self.onError(e);
}
if (undefined !== data) {
self.onData(data);
}
};
}
if (null != data) {
self.onData(data);
}
};

@@ -277,5 +261,2 @@ debug('sending xhr with url %s | data %s', this.uri, this.data);

// xdomainrequest
this.xhr.onload = this.xhr.onerror = empty;
try {

@@ -282,0 +263,0 @@ this.xhr.abort();

@@ -201,6 +201,2 @@

if (xdomain && 'undefined' != typeof XDomainRequest && !exports.ua.hasCORS) {
return new XDomainRequest();
}
// XMLHttpRequest can be disabled on IE

@@ -207,0 +203,0 @@ try {

@@ -6,5 +6,2 @@ // browser shim for xmlhttprequest module

var xdomain = opts.xdomain;
if (xdomain && 'undefined' != typeof XDomainRequest && !hasCORS) {
return new XDomainRequest();
}

@@ -11,0 +8,0 @@ // XMLHttpRequest can be disabled on IE

{
"name": "engine.io-client",
"description": "Client for the realtime Engine",
"version": "0.7.12",
"version": "0.7.13",
"homepage": "https://github.com/LearnBoost/engine.io-client",

@@ -31,2 +31,3 @@ "contributors": [

"devDependencies": {
"zuul": "1.0.3",
"mocha": "*",

@@ -36,6 +37,7 @@ "serve": "*",

"istanbul": "*",
"browserify": "2.35.1"
"browserify": "2.35.1",
"engine.io": "0.7.13"
},
"scripts": {
"test": "make test"
"test": "make test && zuul -- test/index.js"
},

@@ -42,0 +44,0 @@ "browser": {

var expect = require('expect.js');
var eio = require('../');
describe('engine.io-client', function () {

@@ -3,0 +6,0 @@

@@ -6,2 +6,5 @@

var expect = require('expect.js');
var eio = require('../');
var parser = eio.parser

@@ -8,0 +11,0 @@

@@ -0,1 +1,3 @@

var expect = require('expect.js');
var eio = require('../');

@@ -2,0 +4,0 @@ describe('Socket', function () {

var expect = require('expect.js');
var eio = require('../');
var env = require('./support/env');
describe('Transport', function () {

@@ -102,2 +106,4 @@

// these are server only
if (!env.browser) {
describe('options', function () {

@@ -129,3 +135,4 @@ it('should accept an `agent` option for WebSockets', function (done) {

});
}
});

@@ -6,2 +6,5 @@

var expect = require('expect.js');
var eio = require('../');
var util = eio.util

@@ -8,0 +11,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc