Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat 307 308 supported
Browse files Browse the repository at this point in the history
guibwl authored and 刘原 committed Dec 14, 2023
1 parent 9490fd2 commit 5d593a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sources/httpUtils.ts
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ export async function fetchUrlStream(url: string, options: RequestOptions = {})
const creatRequest = (url: string) => https.get(url, {...options, agent: proxyAgent}, response => {
const statusCode = response.statusCode;

if (statusCode === 301 || statusCode === 302)
if ([301, 302, 307, 308].includes(statusCode))
return creatRequest(response.headers.location);

if (statusCode != null && statusCode >= 200 && statusCode < 300)

0 comments on commit 5d593a9

Please sign in to comment.