Skip to content

Compatible with follow-redirect aborts the request#2689

Merged
chinesedfan merged 3 commits intoaxios:masterfrom
chinesedfan:fix-follow-redirects
Feb 15, 2020
Merged

Compatible with follow-redirect aborts the request#2689
chinesedfan merged 3 commits intoaxios:masterfrom
chinesedfan:fix-follow-redirects

Conversation

@chinesedfan
Copy link
Copy Markdown
Contributor

@chinesedfan chinesedfan commented Jan 25, 2020

Preparation for #1804. Closed #2691.

follow-redirects was locked to 1.5.10 in #1993 and was reverted unintentionally in #1816. And #2570 locked it again.

The reason is that from [email protected], the request will be aborted when redirecting. See follow-redirects/follow-redirects@7a0a683. Then axios can't emit the error, which results in test case "should support max redirects" failed.

@RubenVerborgh
Copy link
Copy Markdown

Thanks for unpinning (see also #2691).

@RubenVerborgh
Copy link
Copy Markdown

The error message might not necessarily be a constant though; let's think of a contract that we can sustain. Such as an error code or so.

@chinesedfan
Copy link
Copy Markdown
Contributor Author

@RubenVerborgh Yeah, waiting for your good news about the error code.

@RubenVerborgh
Copy link
Copy Markdown

@chinesedfan As as of [email protected], you can check for err.code !== 'ERR_FR_TOO_MANY_REDIRECTS'.

@chinesedfan
Copy link
Copy Markdown
Contributor Author

@RubenVerborgh Updated with the error code. Thanks for your quick response.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected memory usage Let's establish a closer relation with follow-redirects

3 participants