Comparing version 3.6.0 to 3.6.1
@@ -64,2 +64,3 @@ import retry from "async-retry"; | ||
let throwErr = null; | ||
const tryHeaders = "tryHeaders" in this.options && this.options.tryHeaders ? this.options.tryHeaders.slice() : []; | ||
const fetchDownloadInfoCallback = async () => { | ||
@@ -71,4 +72,4 @@ try { | ||
if (error instanceof HttpError && !this.retryOnServerError(error)) { | ||
if ("tryHeaders" in this.options && this.options.tryHeaders?.length) { | ||
this.options.headers = this.options.tryHeaders.shift(); | ||
if ("tryHeaders" in this.options && tryHeaders.length) { | ||
this.options.headers = tryHeaders.shift(); | ||
await sleep(this.options.tryHeadersDelay ?? 0); | ||
@@ -75,0 +76,0 @@ return await fetchDownloadInfoCallback(); |
{ | ||
"name": "ipull", | ||
"version": "3.6.0", | ||
"version": "3.6.1", | ||
"description": "The only file downloader you'll ever need. For node.js and the browser, CLI and library for fast and reliable file downloads.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
280814
3692