From 1f9281f27d437e3bf06eb3ad0929f708e8d53507 Mon Sep 17 00:00:00 2001 From: Vsevolod Strukchinsky Date: Tue, 30 Dec 2014 13:51:00 +0500 Subject: [PATCH] Discard response payload on redirect response --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index a0b6161..5cebbae 100644 --- a/index.js +++ b/index.js @@ -65,6 +65,8 @@ function got(url, opts, cb) { return; } + res.resume(); // Discard response + get(urlLib.resolve(url, res.headers.location), opts, cb); return; }