Comparing version 2.0.0-beta.0 to 2.0.0-beta.1
@@ -14,4 +14,21 @@ const https= require('https') | ||
const self = this | ||
// this will foolishly expect a SSL service as sweet path | ||
if ((target.port && target.port !== 80) || (target.useHttps !== undefined && target.useHttps === true)) { | ||
self.makeFallbackRequest(target, expects, true, cb) | ||
self.makeFallbackRequest(target, expects, true, (err) => { | ||
// when the user has actually used the wrong protocol or there was a | ||
// protocol redirect. May easily happen when one does not use 80 or 443 | ||
// as port, e.g. 22 or any other random | ||
if (err === 'EPROTO') { | ||
this.makeFallbackRequest(target, expects, false, (err) => { | ||
if (err) { | ||
return cb(err, self.end()) | ||
} | ||
return cb(null, self.end()) | ||
}) | ||
} else if (err) { | ||
return cb(err) | ||
} else { | ||
return cb(null, self.end()) | ||
} | ||
}) | ||
} else if (target.useHttps === false) { | ||
@@ -18,0 +35,0 @@ self.makeFallbackRequest(target, expects, false, cb) |
{ | ||
"name": "probe", | ||
"version": "2.0.0-beta.0", | ||
"version": "2.0.0-beta.1", | ||
"description": "Ping and probe stuff.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8277
244
2