dpovshed / octopus

Sitemap checker/stress test tool based on ReactPHP
11 stars 1 forks source link

Would be nice to add protection against redirect loops #30

Open dpovshed opened 5 years ago

holtkamp commented 5 years ago

@dpovshed can you elaborate on this? Something like:

??

We could keep track of "already processed" URLs...?

dpovshed commented 5 years ago

Yeah, even within a single site cyclic redirect can bring the app down!

What I think we can do - it is a) either track all visited URLs and check, or, b) just count a number of redirects and introduce a cap - like, not more than 10 redirects.

I like more approach (b) because: should be simpler; protect the cases with redirect glitches, when each new redirect is adding something to parameters - I had this case recently, like: /user -> index.php?q=user -> index.php?q=user%q=user -> index.php?q=user%q=user%q=user etc

What do you think?