Skip to content

Commit

Permalink
follow-redirects dropped
Browse files Browse the repository at this point in the history
  • Loading branch information
apocas committed Nov 12, 2016
1 parent 8f8b609 commit 360fb94
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
26 changes: 26 additions & 0 deletions lib/http.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//Based on follow-redirects v0.0.x

var nativeHttps = require('https'),
nativeHttp = require('http'),
url = require('url'),
util = require('./util');

var maxRedirects = module.exports.maxRedirects = 5;

var protocols = {
https: nativeHttps,
http: nativeHttp
};

for (var protocol in protocols) {
var h = function() {};
h.prototype = protocols[protocol];
h = new h();







}
2 changes: 1 addition & 1 deletion lib/modem.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var querystring = require('querystring'),
http = require('follow-redirects'),
http = require('./http'),
fs = require('fs'),
path = require('path'),
url = require('url'),
Expand Down
16 changes: 16 additions & 0 deletions lib/util.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// https://github.com/HenrikJoreteg/extend-object/blob/v0.1.0/extend-object.js

var arr = [];
var each = arr.forEach;
var slice = arr.slice;

module.exports.extend = function(obj) {
each.call(slice.call(arguments, 1), function(source) {
if (source) {
for (var prop in source) {
obj[prop] = source[prop];
}
}
});
return obj;
};
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"dependencies": {
"JSONStream": "0.10.0",
"debug": "~0.7.4",
"follow-redirects": "^0.2.0",
"readable-stream": "~1.0.26-4",
"split-ca": "^1.0.0"
},
Expand Down

0 comments on commit 360fb94

Please sign in to comment.