Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

follow-redirects

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

follow-redirects - npm Package Compare versions

Comparing version 1.15.8 to 1.15.9

31

index.js

@@ -8,4 +8,14 @@ var url = require("url");

var debug = require("./debug");
var nope = require("./nope");
// Preventive platform detection
// istanbul ignore next
(function detectUnsupportedEnvironment() {
var looksLikeNode = typeof process !== "undefined";
var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
var looksLikeV8 = isFunction(Error.captureStackTrace);
if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {
console.warn("The follow-redirects package should be excluded from browser builds.");
}
}());
// Whether to use the native URL object or the legacy url module

@@ -351,6 +361,6 @@ var useNativeURL = false;

// Only write if this request has not been redirected yet
/* istanbul ignore else */
// istanbul ignore else
if (request === self._currentRequest) {
// Report any write errors
/* istanbul ignore if */
// istanbul ignore if
if (error) {

@@ -362,3 +372,3 @@ self.emit("error", error);

var buffer = buffers[i++];
/* istanbul ignore else */
// istanbul ignore else
if (!request.finished) {

@@ -491,3 +501,3 @@ request.write(buffer.data, buffer.encoding, writeNext);

// Wraps the key/value object of protocols with redirect functionality
var wrap = nope.wrap || function wrap(protocols) {
function wrap(protocols) {
// Default settings

@@ -554,3 +564,3 @@ var exports = {

return exports;
};
}

@@ -561,3 +571,3 @@ function noop() { /* empty */ }

var parsed;
/* istanbul ignore else */
// istanbul ignore else
if (useNativeURL) {

@@ -577,3 +587,3 @@ parsed = new URL(input);

function resolveUrl(relative, base) {
/* istanbul ignore next */
// istanbul ignore next
return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative));

@@ -627,3 +637,6 @@ }

function CustomError(properties) {
Error.captureStackTrace(this, this.constructor);
// istanbul ignore else
if (isFunction(Error.captureStackTrace)) {
Error.captureStackTrace(this, this.constructor);
}
Object.assign(this, properties || {});

@@ -630,0 +643,0 @@ this.code = code;

{
"name": "follow-redirects",
"version": "1.15.8",
"version": "1.15.9",
"description": "HTTP and HTTPS modules that follow redirects.",
"license": "MIT",
"main": "index.js",
"browser": "nope.js",
"files": [

@@ -20,3 +19,3 @@ "*.js"

"type": "git",
"url": "git@github.com:follow-redirects/follow-redirects.git"
"url": "git+ssh://git@github.com/follow-redirects/follow-redirects.git"
},

@@ -23,0 +22,0 @@ "homepage": "https://github.com/follow-redirects/follow-redirects",

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