From 26d824b4b230f4ce2471f73401a4b6f7c7c67ac2 Mon Sep 17 00:00:00 2001 From: JonLuca DeCaro Date: Tue, 19 Sep 2023 18:06:20 -0700 Subject: [PATCH] fix type error --- lib/resolvers/http.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resolvers/http.ts b/lib/resolvers/http.ts index 202192de..08c2c4f6 100644 --- a/lib/resolvers/http.ts +++ b/lib/resolvers/http.ts @@ -86,7 +86,7 @@ async function download(u: URL | string, httpOptions: HTTPResolverOptions, _redi } else if (!("location" in res.headers) || !res.headers.location) { throw ono({ status: res.status }, `HTTP ${res.status} redirect with no location header`); } else { - const redirectTo = url.resolve(u, res.headers.location); + const redirectTo = url.resolve(u.href, res.headers.location as string); return download(redirectTo, httpOptions, redirects); } } else {