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

engine: Don't follow redirects an infinite number of times #761

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

robinlinden
Copy link
Owner

No description provided.

Copy link
Collaborator

@Zer0-One Zer0-One left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine, but a question I have is whether or not it makes a difference if the redirects are in fact a loop, or if there's 10 redirects that take you to a different place.

@robinlinden
Copy link
Owner Author

The number of redirects in a row (even if you're not in a loop) allowed by Firefox and Chrome appears to be 20, but I think this is fine for now.

Will rename the error as this doesn't detect loops. At first I was detecting loops by dumping things in a std::set and making sure every load had a unique (Response, Url), but I feel like something like that can wait until we have a cache setup since just having a limit like this covers loops as well, just with a bit more loads.

@robinlinden robinlinden force-pushed the engine-redirect-loops branch from 8f27ddb to 0fd4d8d Compare November 16, 2023 20:49
@robinlinden robinlinden merged commit 0fd4d8d into master Nov 16, 2023
22 checks passed
@robinlinden robinlinden deleted the engine-redirect-loops branch November 16, 2023 21:05
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.

2 participants