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

Custom redirect produces an infinite redirect #4848

Closed
humitos opened this issue Nov 1, 2018 · 3 comments
Closed

Custom redirect produces an infinite redirect #4848

humitos opened this issue Nov 1, 2018 · 3 comments
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required

Comments

@humitos
Copy link
Member

humitos commented Nov 1, 2018

In #4673 we found that defining a custom redirect could produce an infinite redirect. Then, in #4833 we fixed this but some questions about "What's the best way to solve this?" came up.

For now, we are returning a 404 to avoid a 500 (which doesn't make too much sense) and also to avoid the original issue that was the infinite redirect.

This issue is just to track different opinions on how to solve this the best way.

@humitos humitos added Improvement Minor improvement to code Needed: design decision A core team decision is required labels Nov 1, 2018
@humitos humitos added this to the Site admin features milestone Nov 1, 2018
@stsewd
Copy link
Member

stsewd commented Sep 18, 2023

This points to a very old implementation of our proxito code. Right now, if we have an infinite redirect in the 404 view, we just continue with our 404 handling, which seems okay, if we are in the 404 handler means that we didn't find that file, redirecting to that same file will get the same result.

@humitos
Copy link
Member Author

humitos commented Sep 19, 2023

So, what's the current behavior? If it detects there is an infinite redirect it just returns 404, right? If that's the case, we can probably close this issue.

I took a look at what other possible HTTP status code we could return, but I didn't find anyone that I like more than 404. However, I'd like to differentiate, if possible, a regular 404 from a 404 that's because of an infinite loop, but 🤷🏼

@stsewd
Copy link
Member

stsewd commented Sep 19, 2023

So, what's the current behavior? If it detects there is an infinite redirect it just returns 404, right? If that's the case, we can probably close this issue.

yep

@stsewd stsewd closed this as completed Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

2 participants