Socket
Socket
Sign inDemoInstall

rail

Package Overview
Dependencies
3
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.0 to 0.9.0

test/test-http-https-redirect.js

1

lib/plugins/auth.js

@@ -18,3 +18,2 @@ 'use strict';

AuthPlugin.prototype._setup = function() {
var self = this;
var rail = this._rail;

@@ -21,0 +20,0 @@

@@ -67,3 +67,3 @@ 'use strict';

var self = this;
var p, url;
var p, url, configuration;
var location = response.headers.location;

@@ -99,3 +99,3 @@

call.__configure({
configuration = call.__configure({
proto: url.proto,

@@ -108,3 +108,3 @@ host: url.host,

} else {
call.__configure({
configuration = call.__configure({
path: path.resolve(options.request.path, location)

@@ -120,3 +120,3 @@ });

request.end();
call.emit('redirect', options, response);
call.emit('redirect', configuration, response);
} else {

@@ -123,0 +123,0 @@ call.__emit('response', response);

@@ -44,3 +44,3 @@ 'use strict';

this.secureProtocol = null;
this.rejectUnauthorized = null;
this.rejectUnauthorized = true;

@@ -47,0 +47,0 @@ // all

@@ -46,3 +46,3 @@ 'use strict';

host: parsed.hostname,
port: parsed.port ? parseInt(parsed.port, 10) : undefined,
port: parsed.port ? parseInt(parsed.port, 10) : null,
path: parsed.path

@@ -49,0 +49,0 @@ };

{
"name": "rail",
"version": "0.8.0",
"version": "0.9.0",
"description": "An enhanced HTTP/RESTful API Client",

@@ -35,6 +35,6 @@ "keywords": [

"changelog42": "0.7.0",
"eslint": "1.5.1",
"istanbul": "0.3.21",
"eslint": "1.7.2",
"istanbul": "0.4.0",
"mocha": "2.3.3",
"next-update": "0.9.2"
"next-update": "0.9.5"
},

@@ -47,6 +47,3 @@ "scripts": {

"clean": "rm -rf node_modules/ && rm -rf coverage/ && rm -f npm-debug.log"
},
"engines": {
"node": ">= 0.10.40 < 5.0.0"
}
}

@@ -22,6 +22,8 @@ 'use strict';

suiteSetup(function(done) {
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
rail = new RAIL({
request: {
rejectUnauthorized: false
}
});
rail = new RAIL();
var options = {

@@ -59,6 +61,4 @@ key: common.serverKey,

suiteTeardown(function(done) {
delete process.env.NODE_TLS_REJECT_UNAUTHORIZED;
server.close(done);
});
});

@@ -24,3 +24,7 @@ 'use strict';

rail = new RAIL();
rail = new RAIL({
request: {
rejectUnauthorized: false
}
});

@@ -59,5 +63,4 @@ var options = {

delete process.env.NODE_TLS_REJECT_UNAUTHORIZED;
server.close(); // http2 does not emit an event
});
});

@@ -22,4 +22,2 @@ 'use strict';

suiteSetup(function(done) {
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
var options = {

@@ -30,2 +28,4 @@ key: common.serverKey,

RAIL.globalClient.defaults.rejectUnauthorized = false;
server = https.createServer(options, listener);

@@ -50,3 +50,3 @@ server.listen(common.port, done);

var data = response.read();
if (data) { // node.js 0.12 tends to return null on first event
if (data) {
body.push(data);

@@ -131,6 +131,4 @@ }

suiteTeardown(function(done) {
delete process.env.NODE_TLS_REJECT_UNAUTHORIZED;
server.close(done);
});
});

@@ -22,8 +22,7 @@ 'use strict';

suiteSetup(function(done) {
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
rail = new RAIL({
proto: 'https',
request: {
port: common.port
port: common.port,
rejectUnauthorized: false
}

@@ -30,0 +29,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc