Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
feature request: redirectionLimit #1690
Forgive me if this is the wrong place.
I would like to propose modification for GM_xmlhttpRequest to allow imposing limitations on redirections. Currently it is perceived that the underlying function redirects transparently due to the standard but there's a workaround to prevent redirection. This allows bigger flexibilty of GM_xmlhttpRequest scripting.
So in essence I'm proposing adding argument redirectionLimit to GM_xmlhttpRequest so for example bare minimum example from wiki would look like:
So that if the response is for example 302 redirect script would be able to read the 302 status and Location argument etc. Obviously that's just one application.
Note that if the request is stopped due to reaching the redirection limit, onload is never called, so you must do i.e.