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.
- package/index.js +3 -0
- 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
|