From 43546cccc2becd09e00fc467546903c82ccda87f Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 1 Mar 2020 15:49:52 +0200 Subject: [PATCH] Add permanent redirect status code Add permanent redirect status code to allowed redirect status codes --- lib/needle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/needle.js b/lib/needle.js index fda3bf01a..bed799841 100644 --- a/lib/needle.js +++ b/lib/needle.js @@ -37,7 +37,7 @@ var close_by_default = !http.Agent || http.Agent.defaultMaxSockets != Infinity; var extend = Object.assign ? Object.assign : require('util')._extend; // these are the status codes that Needle interprets as redirects. -var redirect_codes = [301, 302, 303, 307]; +var redirect_codes = [301, 302, 303, 307, 308]; ////////////////////////////////////////// // decompressors for gzip/deflate/br bodies