Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: redirect chains with capture/afterResponse hooks #1568

Merged
merged 6 commits into from
Aug 17, 2022
Merged

Conversation

hassy
Copy link
Member

@hassy hassy commented Aug 17, 2022

This PR improves our handling of redirect chains.

We currently run response processors on every response, so e.g. a capture can fail for the first response but succeed for the second response, leading to multiple callbacks to async.waterfall being invoked.

This PR changes the logic to only run response processors on the last request in the chain.

It also refactors the code to get rid of async.waterfall.

@hassy
Copy link
Member Author

hassy commented Aug 17, 2022

Related: #1544

@hassy hassy merged commit 08f73b9 into master Aug 17, 2022
@hassy hassy deleted the fix/http-engine branch August 17, 2022 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant