follow-redirects 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of follow-redirects might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +3 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -220,6 +220,9 @@ RedirectableRequest.prototype._processResponse = function (response) {
220
220
  Object.assign(this._options, url.parse(redirectUrl));
221
221
  this._isRedirect = true;
222
222
  this._performRequest();
223
+
224
+ // Discard the remainder of the response to avoid waiting for data
225
+ response.destroy();
223
226
  }
224
227
  else {
225
228
  // The response is not a redirect; return it as-is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "follow-redirects",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "HTTP and HTTPS modules that follow redirects.",
5
5
  "main": "index.js",
6
6
  "engines": {